Don't use document.write() in log()