Have contingency plans ready. No matter how well you think you've laid out a logical course of action your players would take, at some point they WILL decide to go off on a random tangent and do something completely unexpected for a very stupid reason.