code: func getStateFromPath(path string) (*statefile.File, error) {
  	f, err := os.Open(path)
  	if err != nil {
  		return nil, fmt.Errorf("Error loading statefile: %s", err)
  	}
  	defer f.Close()
  
  	var stateFile *statefile.File
  	stateFile, err = statefile.Read(f)
  	if err != nil {
  		return nil, fmt.Errorf("Error reading %s as a statefile: %s", path, err)
  	}
  	return stateFile, nil
  }
docs: // getStateFromPath returns a statefile if the user-supplied path points to a statefile.