Update writer.js