issue #5. added logging and recovery after exception occurs
issue #5 remove testing code
Merge pull request #6 from dodax/issue_5

Issue 5