use a temporary file for writing results
update tempfiles