Wait for futures to prevent spilling log messages