Demonstrates using if statements to sort out an IOException