Force fsync() after writing statefile