actually kill temp buffer when done, even after an error