sync STDOUT for auto-flush