Updated to check for both the existence of a file or that the command
sent is in the PATH of the service.