force write with fsync to make sure file exists