saves gh file on exit.