Flush stdout after each write.