refactoring some logging messages