Fixed issue with stopping before generating all necessary values. 
Created Map of flags. 
Used two flags - 'exit' and 'exitNow':
•	'exitNow' has be executed immediately (on limit records or going out
of some IDs) 
•	'exit' will be executed as soon as all current task will be finished