Better Error Handling in Example

Moved from `console.error(err)` to `console.error(err.stack)` which will produce output more inline with what one would expect in this scenario (a full stack trace).
Merge pull request #80 from xjamundx/patch-4

Better Error Handling in Example