docs: def file_exists(filename):
      """
      Check if a file exists (and don't error out on unicode inputs)
      """
      try:
          return os.path.isfile(filename)
      except (UnicodeDecodeError, UnicodeEncodeError, ValueError):
          return False