update for storing data in file