CAS-1238 Introduce local variable for clarity per code review feedback.
CAS-1238 Use commons-io IOUtils to close reader.