protected function readChainFiles(array $chainPaths)
    {
        $chainFiles = [];
        foreach ($chainPaths as $chainPath) {
            if (!is_readable($chainPath)) {
                throw new \Exception("The chain file could not be read: $chainPath");
            }
            $chainFiles[$chainPath] = trim(file_get_contents($chainPath));
        }

        return $chainFiles;
    }