Added - handling endOfFile