added option to wait for running containers