fixed syntax of logging function