kill doc.write trick.