Implement error handling for `add` command

I'm not sure whether this is done in appropriate way. Any suggestions are welcome!