Small tweak to logging function