Command exists function added, added error if #command is called with an invalid command