We all mess up! It's a fact, no matter how hard we try to do the right thing, it is not always clear what the right thing is. God loves us even when we do wrong, and the bible is filled with examples of righteous men of God making mistakes and recieving grace. We will never be perfect, but God will always offer us grace when we recognize our foolishness and turn to Him.
That survival mechanism that has our mind convinced that the reality it has created is true, can often trap us into believing that the path we have chosen is right. The enemy is very crafty when it comes to making an opportunity appear to be a blessing when in reality it is a dangerous trap. We must be asking for and listening to the guidance God gives, measuring everything against His word, and be willing to obey the leading of the Spirit, to avoid following our emotions into such a trap.
When we find we have erred in judgement and chosen unwisely, we must abandon those choices and return to God's path for us without concern for embarrassment it may cause. Too often we stay on the wrong path because we are so heavily invested in it, and just dig ourselves deeper into a hole God wants to pull us out of. Always be listening for His still small voice.
Our security is indeed in the hands of the Lord. Those who recognize this and walk the walk, will impart to their children the same attitude. God never changes, but through many generations we have changed.
We are the product of the generations before us; each generation has "downloaded" their "programming" of a fear and hostility based existence upon their children. We have much work to do to cleanse ourselves of all of the untruth we learned from our parents and other authority figures in our lives.
In doing that work, we offer the next generation, the children and youth over which we have some measure of influence, a legacy of moving closer and closer into a loving and personal relationship with our Creator.