Moved SetTimeout to take advantage of forEach's blocking.