{
  line=$0
  match(line, /"/)
  # Only process likely logging/echo lines to reduce risk
  if ($0 ~ /(^|[[:space:]])(echo|log_info|log_warn|log_error|log_success|info|warn|log|section)/) {
    n = gsub(/"/, "\"", line)
    if (n % 2 == 1) {
      print $0"\""
    } else {
      print $0
    }
  } else {
    print $0
  }
}
