Added state polling to main dataset creation logic