code: func IsCodeExist(tmppath string) error {
  	file, err := os.Open(tmppath)
  	if err != nil {
  		return fmt.Errorf("Could not open file %s", err)
  	}
  
  	fi, err := file.Stat()
  	if err != nil {
  		return fmt.Errorf("Could not stat file %s", err)
  	}
  
  	if !fi.IsDir() {
  		return fmt.Errorf("File %s is not dir\n", file.Name())
  	}
  
  	return nil
  }
docs: //IsCodeExist checks the chaincode if exists