resolve Closeables.closeQuietly deprecation issues

Use recommended Closer pattern instead of Closeables.closeQuietly.