fixes #7, better error handling
Merge pull request #16 from BowlingX/master

fixes #7, better error handling