[Patch #1514544 by David Watson] use fsync() to ensure data is really on disk
2 files changed