fix FFSYNC by changing it to O_SYNC