Why do you have this construct here? Why are you not printing a stack trace on an IOException?
Isn't there a way to hand over the exception to JUnit?