iterating till we reach max-entries or till we read all the logs from start-time to end-time