BUG cleaning up temporary files for #398