The 'which' command was missing from the check.