No idea why I fail the test. I saw the solution but it doesn't make any sense. 1) they do not close the stream 2) And I don't see what is wrong with my code as the only difference is that they add if(total != 0;