code: func (p *Plugin) writeAsTemplate(pr *Process) {
  	tmp, err := p.processToTemplate(pr)
  	if err != nil {
  		p.Log.Errorf("cannot create a template from process: %v", err)
  		return
  	}
  	if p.tReader == nil {
  		p.Log.Warnf("process %s should write a new template, but reader (template path) is not defined",
  			pr.name)
  		return
  	}
  	if err = p.tReader.WriteTemplate(tmp, template.DefaultMode); err != nil {
  		p.Log.Warnf("failed to write template %s: %v", tmp.Name, err)
  		return
  	}
  }
docs: // Writes process as template to the filesystem. Errors are logged but not returned