onDocumentClosed