Sync STDOUT so the logger is always up to date