diff --git a/t/32_isHTML_valid.t b/t/32_isHTML_valid.t
index 7e2bcf8..b1f8751 100755
--- a/t/32_isHTML_valid.t
+++ b/t/32_isHTML_valid.t
@@ -20,11 +20,20 @@ my $htmlfile="tmp.html";
# Pick /usr/bin/openssl as we want to avoid the debug messages like "Your ./bin/openssl.Linux.x86_64 doesn't support X25519"
my $diff="";
my $ip="";
+
+
die "Unable to open $prg" unless -f $prg;
printf "\n%s\n", "Doing HTML output checks";
+
+# useful against "failed to flush stdout" messages
+STDOUT->autoflush(1);
+
+
+# Provide proper start conditions
unlink $htmlfile;
+
#1
printf "%s\n", " .. running $prg against \"$uri\" to create HTML and terminal outputs (may take ~2 minutes)";
# specify a TERM_WIDTH so that the two calls to testssl.sh don't create HTML files with different values of TERM_WIDTH
diff --git a/t/33_isJSON_severitylevel_valid.t b/t/33_isJSON_severitylevel_valid.t
index d669e34..9c50521 100755
--- a/t/33_isJSON_severitylevel_valid.t
+++ b/t/33_isJSON_severitylevel_valid.t
@@ -24,6 +24,9 @@ printf "\n%s\n", "Doing severity level checks";
die "Unable to open $prg" unless -f $prg;
unlink 'tmp.json';
+# useful against "failed to flush stdout" messages
+STDOUT->autoflush(1);
+
#1
pass(" .. running testssl.sh against $uri to create a JSON report with severity level >= LOW (may take 2~3 minutes)"); $tests++;
$out = `$prg $check2run --jsonfile tmp.json $uri`;
diff --git a/t/51_badssl.com.t b/t/51_badssl.com.t
index e215e34..88c59fe 100755
--- a/t/51_badssl.com.t
+++ b/t/51_badssl.com.t
@@ -20,6 +20,9 @@ my (
die "Unable to open $prg" unless -f $prg;
+# useful against "failed to flush stdout" messages
+STDOUT->autoflush(1);
+
# Provide proper start conditions
unlink 'tmp.json';