Fixed console logger function