blocking logging on debug flag