diff --git a/exec/mqtt_spy.js b/exec/mqtt_spy.js
index 77f82e1004091fbf06422533c20b21a100a233c6..8e1ca323ac630c97b69be9a545cf855a9ff575b8 100755
--- a/exec/mqtt_spy.js
+++ b/exec/mqtt_spy.js
@@ -47,7 +47,7 @@ function output(str)
 			str = utf8_encode(str);
 	}
 	if(js.global.console)
-		console.write(str);
+		write_raw(str);
 	else
 		write(str);
 }