Update the contents of the file.