diff --git a/test_execution.sh b/test_execution.sh
index 9fc7a97..a3710bc 100644
--- a/test_execution.sh
+++ b/test_execution.sh
@@ -37,14 +37,17 @@ EOF
# 1. CD into the repo path
# 2. Execute command and capture output
-# 3. PIPESTATUS[1] captures the exit code of the CMD, not the 'cd' or 'tee'
+# 3. PIPESTATUS[0] captures the exit code of the eval "$CMD"
+echo "--- Execution Start ---" | tee -a >(sed 's/$/
/' >> "$LOG_FILE")
cd "$REPO_PATH" && eval "$CMD" 2>&1 | tee -a >(sed 's/$/
/' >> "$LOG_FILE")
EXIT_CODE=${PIPESTATUS[0]}
+echo "--- Execution End (Exit Code: $EXIT_CODE) ---" | tee -a >(sed 's/$/
/' >> "$LOG_FILE")
# Close HTML tags
echo "