protected function loadConfig()
    {
        $options = getopt('c:');
        if (!isset($options['c'])) {
            throw new WorkerException('No path to configuration provided.');
        }
        $pathToConfig = $options['c'];
        if (!file_exists($pathToConfig)) {
            throw new WorkerException('Config file not found.');
        }
        $this->config = require $pathToConfig;
    }