fix output logging