Fixed saved functionality, error where save was concatenating updated files contents to old files contents.