write synchronous to stdout

This prevents the problem of stdout not being flushed on windows without requiring a separate batch file.