error handle for commands.
adding check command.