Following your Word has kept me from wrong.
Your ways have molded my footsteps, keeping me
From going down the forbidden paths of the destroyer. (Ps 17.4, Passion Translation)

David is talking about a couple of things here. First, he points out that, like it or not, choose it or not, desire it or don't desire it, but we are all on a pathway in this life. We are all going somewhere. Even going nowhere is going somewhere in the course of life. Second, one path leads to the destroyer. In other words, there is a path you can take that will lead to your destruction.

There is an antidote to the pathway to destruction, a way through, a choice you can make to not go down the path of destruction. David is very clear on what that choice is, it is following your Word. There is something about God's Word that keeps us from wrong, that leads us away from the path to death and towards life. We won't fully understand until the New Testament that it's God's grace that changes us so that we want to follow God's Word. Grace leads to obedience, and obedience leads to following God's Word, and following God's word leads to life. Meanwhile, the Psalmists were very clear on the place of God's Word in leading us to life. Read any verse in Ps. 119 for instance.