Stopping blank pages being loaded as a DOMDocument to remove warnings
Adding logging via ability to specify a logger function
Adding logging sample code to readme file