various fix, another logging implementation (ahem) and a missing import