All such close() calls need to be moved into finally blocks.