added some conditions around script extracting and cleaned up a bit in runBenchmarks