Add tempfiles support