Fix accidentally deleted return 0 in checkEndOfFile()