[fix] error reporting

this.emit('error', ...) fails because `this` is lost in the callback function scope