more logging, minor tweaks