Added handler for exceptions in retrieving a URL.