Add logging. Fix retry register provider.