Changes to help track down errors, including temporary STDOUT prints in monkeypatch.py and kernel.js