wait for app to start

fixes #269