with a problem of identifying the end of file