No campaign idea, regardless of how well thought out or thoroughly planned, survives contact with the PCs. Here you can post ideas on how to maintain the flow of the campaign, even when the party does something truly outlandish.
On the subject of adventure management ALWAYS TAKE GOOD NOTES! If you create an NPC on the fly write their name and details down including their interaction with the party. Even the smallest NPC might get a secondary visit from the characters if they're passing through the same town twice, etc. As far as flow you can save yourself a lot of heartache by reskinning your plot hooks when the characters (and trust me they will) ignore it or destroy it. That way you don't miss running that content you spent hours on and the characters don't feel like they're playing a linear game. I let my players think they have the run of the show (which is the point of the game) but in reality I have them right where I want them... IN ME POWER! MWAHAHAHAHAHA!! Oh wait, sorry. Anyway I've seen it all. From "I kill the important quest NPC" to "I don't like this guy, I'm going elsewhere". You can always reuse a plot hook with just a little tweaking.
You ain't kiddin', take notes. :-) Also, contingency plans. You can't plan for every possibility, but I've seen GMs who bet the farm on a scenario going like so, only to see the players unwittingly and casually do exactly the one thing that would make the entire scenario fail to even start. And then they get mad at the players! Really important to have ideas to guide the story's flow, even when the players decide the best way from Point A in New Jersy to Point B in Pennsylvania is by way of Sidney, Australia.
Most definitely. The worst example I had was a small farming village having problems with undead attacking in the night. The party tracked them down to a cave which led to the whole adventure, an undermountain-style (meaning HUGE) dungeon I had designed. Their plan? Block the entrance off by systematically caving in the first few tunnels using the party's dwarves, explosives, and magic. I seriously hadn't thought of them doing that. So I just repositioned the entrance of the dungeon to a different location they traveled to. Plain and simple.