Added checking for nonexistant commands and filters, and error handling for commands and filters