added checks to make sure windows processes completed their tasks.