Fixed issue with use of logger before being defined, when importing modules.