Added waitForJobsToCompleteOnShutdown