added support for throw exception in reader on reading after closing.