Should only catch IOException, which is impossible for TrustedByteArrayOutputStream