modify save file method