Code to check for bad URLs