added lines 41-43 to open file, merge files, and save file