Use the new node "buf.wirte" api.
".write(string, encoding, offset, length)"is deprecated.
Use "write(string[, offset[, length]][, encoding])" instead.