check document.body for existence before use and insert ember_debug.js as first script to be executed