Syncing output when running in foreground.