Test if which is found before testing if it fails