I find flexibility is the best thing in GMing or DMing. So what if they don't follow the planned route the adventure sets forth, there are MANY ways to get them to go there...and if they don't...well...improvise.
Some of the best adventures I've had are from improvisations which I came up with on the spot when the party decided to go the opposite direction.
Don't be afraid to let them fail and have consequences. Just today, the party failed to really talk or negotiate with a intelligent creature and led to a pretty major conflict in which they absolutely not only failed the quest and adventure, but brought about dire results for the surrounding countryside. They survived (well, for the most part, one is dead as an undead), but the entire point of the adventure was failed.
If they do something, go with the flow of it. I find being a DM/GM requires inventiveness, quick thinking on your feet, and great improvisation. With those as your tools it is VERY HARD to make an adventure go wrong. You can adapt to whatever they do most of the time.