Minor tweak to logging function