Using tmp for intermediate files