added buildconfig.debug check to log.d statements