revised debug output