consider that :eof is returned when read empty file