read entity may reach end of file