Moved the waitForCompletion(futures) to the Utils class.