added function for saving note list to file