Corrected reader not closing properly