Use rethrowAlways(Throwable) instead and guard against null
if (th != null) IOUtils.rethrowAlways(th)
Rethrows the argument as IOException or RuntimeException if it's not null.