checking for context.loaded before adding script, added option to debug
minified