redirect output if no logging to null