Debug output improvements

This is a collection of changes I made while trying to get better info from failing tests.