Update writestream.js