Update for document writing