wait for processes in run.sh