added error handler to loadScript
added iddqd.pattern.callbackToPromise