Added command_exists function