Update write to file.