Added output flushing to use with tail -f
Hint for Mac OS X build