add delete record file function