More logging and smaller fixes.