Add test case for IOError catch.