histfactory.utils use new string formatting and make loggers local to each function