Fixed a logging issue in DEBUG