Add some sanity checks to the diagnostic/benchmarking/profiling script