fixing logging line only in debug mode