added code formatting on migrated code SS-365

Add a proper error message when wrapping the original exception around with an IOException