Added basic error handling

* use bunyan for logging