No need to create more than one tmp-file. Using just one for everything is OK.