Callback is now (error, event) and it listens to the error event on the script tag.
added callback with `err, event`