Cleanup test for document error handling