minor fixes + logging