docs: def validate(config):
      """validate config file"""
      with open(config) as fh:
          content = fh.read()
  
      try:
          data = yaml.safe_load(content)
      except Exception:
          log.error("config file: %s is not valid yaml", config)
          raise
  
      try:
          jsonschema.validate(data, CONFIG_SCHEMA)
      except Exception:
          log.error("config file: %s is not valid", config)
          raise
  
      log.info("config file valid, accounts:%d", len(data['accounts']))
      return data