Catching errors when cmdOptions are invalid