fixed up logging