fixing up logging