Changed the order of debug script and put it at the top.