Added a HEAD request before any GET requests to verify if a page is a 200 OK and a HTML page.