Added exit on error
Merge pull request #2 from secutortheone/master

Added exit on error