use error object for 'err' callback param

Error object contain stacktraces and additional information that helps
debug potential issues. They are expected as the first argument versus
just a string.
Merge pull request #72 from shtylman/fix-error-cb

use error object for 'err' callback param