Fix NullPointerException when reading from S3
Use ImmutableEnumSet
Fix use of closed RecordReader