If an error happens while loading, the old document should be left intact. Ensure this by not modifying the document until all loading code has been run.
If an error happens while loading, the old document should be left intact. Ensure this by not modifying the document until all loading code has been run.