Exception handling added to url_keyword and dns_lookup method.