NPE when handling corrupt jar files

Use a `finally` block. Something like

```java
ByteArrayOutputStream bos = new ByteArrayOutputStream();
Content file = null;
try {
            // stuff
} catch (IOException io) {
            // handle message handling and re-throw
} finally {
            bos.close();
            return file;
}
```