Sync output log file on every record

Some of the records generated on windows were dropping the last
few entries on a hang / crash, which kind of defeats the purpose..