Catch IOException instead of UnknownHostException