bugfix: DocumentWriter recursive write