added an option to save files