replace fdatasync() to open(O_SYNC)