Added more sanity checks to TestScript