71 It is good for me that I have been afflicted; that I might learn thy statutes.
Psalm 119
67 Before I was afflicted I went astray: but now have I kept thy word.
Psalm 94
12 Blessed is the man whom thou chastenest, O LORD, and teachest him out of thy law;
Hebrews 12
10 For they verily for a few days chastened us after their own pleasure; but he for our profit, thatwe might be partakers of his holiness.11 Now no chastening for the present seemeth to be joyous, but grievous: nevertheless afterward it yieldeth the peaceable fruit of righteousness unto them which are exercised thereby.
I don't know about you but I learn a lot about God and His ways through my failures. Thank God that failures for God's children are stepping stones to growing spiritually.