closes #6
Merge pull request #10 from OSSP2014/error_handling

Error handling