Change visit() to throw IOException, javadoc update