error handling
got the erros handled
Merge pull request #105 from Hendrixer/dev

error handling