Add more debug printing for unit tests