Throwing IOException instead of Exception