added basic error handling and logging wrapper
Merge pull request #19 from webair/feature/error

added basic error handling and logging wrapper