fixed the fsync_per_write bug
added fsync_before_close to producer