update a txt file