add correct error handling for url_stat