add task to handle exceptions