Introduced isEndOfFileReached() + added a noisy debug line.