added option to wait for active deployment