Revise command to check command exists