#691: close stream and reader afterwords