public function enterLegacyRootDir()
    {
        $this->previousRunningDir = getcwd();
        if ($this->logger) {
            $this->logger->debug("Legacy kernel: Leaving '$this->previousRunningDir' for '$this->legacyRootDir'");
        }
        chdir($this->legacyRootDir);
    }