[fix #23] add the feature to save files automatically