updated to batch 7 and added error support