delete and add to file