Add max retires to phantom script