diff --git a/mockserver/main.go b/mockserver/main.go
index ea79cdde6..051112328 100644
--- a/mockserver/main.go
+++ b/mockserver/main.go
@@ -90,6 +90,7 @@ func (ts *transactionHttpServer) GetNumberOfTransactionsPerMinute(w http.Respons
 
 	w.Header().Set("Content-Type", "application/json")
 	if err := json.NewEncoder(w).Encode(TransactionPayload{tpm}); err != nil {
+		w.WriteHeader(http.StatusInternalServerError)
 		io.WriteString(w, err.Error())
 		log.Printf("Unable to write response: %v", err)
 	}
@@ -128,7 +129,7 @@ func StartHttpServer() {
 		if err := appServer.ListenAndServe(); err != nil {
 			log.Printf("Verification server error: %v", err)
 			err := appServer.Shutdown(context.TODO())
-			log.Fatalf("Shuwdown server error: %v", err)
+			log.Fatalf("Shutdown server error: %v", err)
 		}
 	}(&store)
 	wg.Wait()
diff --git a/util/common/traces/generate.go b/util/common/traces/generate.go
index 74fbc71d7..d60350dcd 100644
--- a/util/common/traces/generate.go
+++ b/util/common/traces/generate.go
@@ -1,6 +1,7 @@
 package traces
 
 import (
+	"fmt"
 	"github.com/aws/amazon-cloudwatch-agent-test/util/common/traces/common"
 	"github.com/aws/amazon-cloudwatch-agent-test/util/common/traces/xray"
 	"time"
@@ -34,9 +35,8 @@ func StartTraceGeneration(receiver string, agentConfigPath string, agentRuntime
 		cfg.Generator = xray.NewLoadGenerator(&xrayGenCfg)
 		cfg.Name = "xray-performance-test"
 	case "otlp":
-		panic("Only supports xray for now.")
 	default:
-		panic("Invalid trace receiver")
+		return fmt.Errorf("%s is not supported.", receiver)
 	}
 	err := common.GenerateTraces(cfg)
 	return err