Flush after every write

With execution time the harvester consume more and more memory. What I
feared is a memory leak seems to be caused by buffering up all the data
being written to the stream writer. With this commit the stream is now
flushed after every write.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>