Polished the logging