added calculate/batch run error checking
added calculate/batch run error checking
cleaning up batch