viewer: Improve debugging messages