refined testall batch file and script