code: func AppendBytesToFile(pth string, fileCont []byte) error {
  	if pth == "" {
  		return errors.New("No path provided")
  	}
  
  	var file *os.File
  	filePerm, err := GetFilePermissions(pth)
  	if err != nil {
  		// create the file
  		file, err = os.Create(pth)
  	} else {
  		// open for append
  		file, err = os.OpenFile(pth, os.O_APPEND|os.O_CREATE|os.O_WRONLY, filePerm)
  	}
  	if err != nil {
  		// failed to create or open-for-append the file
  		return err
  	}
  	defer func() {
  		if err := file.Close(); err != nil {
  			log.Println(" [!] Failed to close file:", err)
  		}
  	}()
  
  	if _, err := file.Write(fileCont); err != nil {
  		return err
  	}
  
  	return nil
  }
docs: // AppendBytesToFile ...