fix hg + logging