added a try/except to batchrun