Actually close files on simulation shutdown