write all tmp files to tmp dir