cleanup
locate('php','foo.php','url',false) will return null, not exception - faster!