Build improvements and Error handling
Merge pull request #2 from loladiro/master

Build improvements and Error handling