Log file syncing.
Always flush when the current source is finished, before any writer can be 
closed (in case it is the last source of the file).
Merge pull request #136 from drusk/flush_timing

Flush timing