Make sure to delete the tmpfile when you're done with it