added check in run.sh to see if all applications have been removed