Rework of retry module to support exceptions instead of returned boolean flag