fs.writeSync instead of fs.write