def index_file
      @index_file ||= begin
        if config.fetch("index", {})["file"]
          return config["index"]["file"] if File.file?(config["index"]["file"])
          raise Errno::ENOENT, "Index file (#{config['index']['file'].inspect}) does not exist"
        end
        raise ArgumentError, "No index file specified on command line (--index-file) or in configuration file"
      end
    end
def index_file
      @index_file ||= begin
        if config.fetch("index", {})["file"]
          return config["index"]["file"] if File.file?(config["index"]["file"])
          raise Errno::ENOENT, "Index file (#{config['index']['file'].inspect}) does not exist"
        end
        raise ArgumentError, "No index file specified on command line (--index-file) or in configuration file"
      end
    end
Get the index file from the options or configuration file. Raise error if it does not exist or
 was not specified.