more logging + minor fixes