Return different exit codes
Merge pull request #58 from macbre/error-handling-improved

Improve errors handling