Fixing wait statement to work when condor creates dat