code: def valid_file(path: str) -> bool:
      
      path = Path(path).expanduser()
      log.debug("checking if %s is a valid file", path)
      return path.exists() and path.is_file()
docs: Verifies that a string path actually exists and is a file
  
      :param path: The path to verify
      :return: **True** if path exist and is a file