add restart_on_error exception handling