Close streams at quit