Added ability to specify a number of retries if a page fails due to a bad status code