code: func (c *Console) Stop(graceful bool) error {
  	if err := ioutil.WriteFile(c.histPath, []byte(strings.Join(c.history, "\n")), 0600); err != nil {
  		return err
  	}
  	if err := os.Chmod(c.histPath, 0600); err != nil { // Force 0600, even if it was different previously
  		return err
  	}
  	c.jsre.Stop(graceful)
  	return nil
  }
docs: // Stop cleans up the console and terminates the runtime environment.