Added error handling for batch finished message