added error handling
Merge pull request #1 from tavisca-atejankar/master

added error handling