fs.close, fs.openSync, fs.fsync, fs.fsyncSync + refactoring