added a saving file to exit