return null main content if an exception happended
add comments to two main functionalities fo the document parser