Use ImmutableEnumSet
Fix use of closed RecordReader