Adding logging for selective retry