code: func WriteStepSpecToFile(templateCollection models.StepCollectionModel, route SteplibRoute) error {
  	pth := GetStepSpecPath(route)
  
  	if exist, err := pathutil.IsPathExists(pth); err != nil {
  		return err
  	} else if !exist {
  		dir, _ := path.Split(pth)
  		err := os.MkdirAll(dir, 0777)
  		if err != nil {
  			return err
  		}
  	} else {
  		err := os.Remove(pth)
  		if err != nil {
  			return err
  		}
  	}
  
  	collection, err := generateStepLib(route, templateCollection)
  	if err != nil {
  		return err
  	}
  
  	bytes, err := json.MarshalIndent(collection, "", "\t")
  	if err != nil {
  		return err
  	}
  
  	if err := fileutil.WriteBytesToFile(pth, bytes); err != nil {
  		return err
  	}
  
  	pth = GetSlimStepSpecPath(route)
  	slimCollection := generateSlimStepLib(collection)
  	if err != nil {
  		return err
  	}
  
  	bytes, err = json.MarshalIndent(slimCollection, "", "\t")
  	if err != nil {
  		return err
  	}
  
  	return fileutil.WriteBytesToFile(pth, bytes)
  }
docs: // WriteStepSpecToFile ...