Refine the script that scans for obsolete URIs