Upstream fixes
Now removes tmp files before destroy