Improved debug and trace logging aspects.