Debug logs

I'd prefer separating unrelated changes into another pr. These seem harmless and tested enough for it not to be a huge issue.