update tmp file