why do you check size of line and then prints "Could not open input file"?