Improve stdout flushing.

Flushing after every line is helpful to see information quickly.

By default, Haskell application use NoBuffering when piped into
another process, which for example hides the output of cabal build
when run via a Continuous Integration server, an output-capturing
build tool, or ssh.