Not sure why this isn't validating. It works exactly as they request when tested with real files. I think this might be one of those situations where the reason the validator gives is actually not related at all to the problem. I did check the solution in this case and note that they declare the FileInputStream inside the while loop repeatedly, whereas my code declares it before the while loop and then repeatedly closes and re-assigns the same FileInputStream variable each time. I'm wondering if it doesn't like that. I usually create variables outside of loops because I think (and correct me if I'm wrong) it's slower to both create and assign the variable each loop iteration than it is to merely re-assign it each time. They also use an alternate form of try but since they don't specify that you have to use that form of it, I'm assuming that doesn't matter. I also note that the solution does not close the reader when it's done, and while they don't say to close that, it seemed like bad form not to.