Fix problem with print

Replace print with sys.stdout.write as the plugin doesn't load otherwise