Fix use of closed RecordReader