added printout of batch file at end of code
added more printout to see which batch mode finished