added script debug functionality to redirect page.