private function openLogfile(): string
    {
        $logfileName = $this->getLogfileName();
        $pathToLogfile = $this->logsDir . $logfileName;
        if (!file_exists($pathToLogfile)) {
            $openedMsg = sprintf('[ %s ] Logfile opened', date('Y-m-d H:i:s')) . PHP_EOL;
            file_put_contents($pathToLogfile, $openedMsg);
        }
        return $pathToLogfile;
    }