Some more fixing of logging