finish open file,save file,close file