modified log in utils to be config-independent