Log exceptions on close() operations instead of masking them.