Add maxNumberOfLines
Pass maxNumberOfLines, remove the extra created flags. Pass the same instance of exitFlag
Dont create a new exitFlag in consumerResult
Remove excessive logging