Improve error handling for non-existing commands