WIP need cross-platform way to open file for writing to get file descriptor
for fsync()