Exiting on error should return -1
Merge pull request #83 from mephux/master

Exiting on error should return -1