Save the document