Add a whileLoop function to utils/promises. This loop also works if for many iterations.