Update CompressedObjectStrategy to try-with-resources but print log error if error while closing