Add some better debugging code.