Added retry logic with options (+ tests).