Fixing up logging