Better error handling; ditch Promise.prototype.end