minor improvemnets on logging