Moved creation of the writer to the server worker.