Added support for importing pages which start with a comment outside the html element
Retry reading a template page if establishing a connection fails.