Moved logger initialization up