Updates a section inside a file with newer content while removing the old content.