fix leaked tempfiles