replaced newLogger() function with global var