Syncing STDOUT. Fixes #625.