insert a line in a file and backup it