code: def retrieve_config_file(self):
          
          try:
              if self.args["configfile"]:
                  return self.args["configfile"]
          except KeyError:
              pass
          return os.path.expanduser('~/.config/greg/greg.conf')
docs: Retrieve config file