Improved debug messaging.