I rarely run published adventures, and in my home campaigns I don't plan out much in the way of physical layout. In large part that's because I run a very open sandbox, and it's rare that the PCs go where I actually expect them to go.
So some of this may apply, some may not.
I frequently try to reward skills people take. If someone has made their work as an armorer important, now and then they'll notice some detail about the enemy's armor that others may have missed.
Same thing with exploration. It may not find the treasure, but it may find clues to where the treasure is.
Advancing the Plot
The party doesn't know it, but there's an important document inside the dungeon ...
I don't run plot based campaigns per se. More event, motivation and choice driven campaigns. So there will never be that one important document. Yes, if the PCs come across information they can use it's great and rewarded. They get to advance directly to GO and collect their 200 GP. Or fight the wizard, whatever.
I do try to give multiple hints and options to find the information they need, but what if that fails? Well failure can be just as interesting. They didn't stop the wizard so they attacked the town, but one of the survivors of the attack gives other hints on how to find them.
Sometimes the PCs lose. Hopefully that just makes eventual success all the sweeter. Where you have to be careful with this is that ideally they will know exactly what clues they missed. There should be a "Oh crap. Remember when
_ and we didn't _?" moment. It's no fun to think you had
no chance to be the heroes, but realizing you
could have been the heroes and just missed it can be quite memorable. In a good way.
Imparting Information
The party is struggling through a dungeon that ends with a fireball-casting wizard. You want the players to know what they're up against so they can prepare...
Again, I would give multiple clues but if they miss all the clues then they miss them. Maybe the encounter is so difficult that they have to run away in a less than valiant retreat. I don't do this very often because it's too easy to misjudge how clear my clues are. I don't expect players to read my mind.
So yes, I adjust things on the fly all the time. No, I don't guarantee that the party is always going to win, I just adjust the story so that the adventure continues. Most of the time when a door closes (or it's hidden and they miss it) another door opens. Unfortunately for the party the new door has rusty hinges which alerts the guards and everybody needs to roll initiative. Oh, and the guards have a cave troll.
