handle errors on callback

closes #4
@0.6.0 handle errors on callback