added code to handle unchecked exceptions while sending the batch