error trapping
Merge pull request #2 from dunetje/master

error trapping