add restart on error flag