reintroduce eof-specific exception on reads, but ensure handle is closed properly.