Added an error catcher for commands.