Replace text in files row by row