make a function for cleaning up tempfiles