replaced old tmp with new tmp file