error handling code
test of error handling done.
Merge pull request #6 from koma75/develop

Error handling implemented