Hunting memory leak during batch refactorings.

Ensured all used IOpenables are closed to avoid memory leaks.
See IOpenable javadoc.