made fsync configurable when writing json files