code: func (fsh *Handler) WriteFile(file string, data []byte) error {
  	fileObj, err := os.OpenFile(file, os.O_TRUNC|os.O_WRONLY, os.ModePerm)
  	if err != nil {
  		return fmt.Errorf("failed to open status file %s for writing: %v", file, err)
  	}
  	defer fileObj.Close()
  	if _, err := fileObj.Write(data); err != nil {
  		return fmt.Errorf("failed to write status file %s for writing: %v", file, err)
  	}
  	return nil
  }
docs: // WriteFile is an implementation of the file system API interface