Saving the data to a file