Simplified code around UnknownCommandException