added sync to file log writes