Add fsync() call in atomic_writing