Override document.write when the page is done loading to fix bug with rerunning scripts that call it