Fixed page not loading due to js
updated the index_debug script to assist with debugging.