Buffer.write is now used to write strings instead of custom code