Rewrote debug output