code: public static void safeClose(final Closeable stream) {
  		if (stream != null) {
  			try {
  				stream.close();
  			} catch (IOException e) {
  				LOG.error("Failed to close resource stream", e);
  			}
  		}
  	}
docs: Closes an OutputStream, logging any exceptions.
  
  @param stream the stream to close.