I'd say the best way to stay off of railroading PC's (aside from having a flexible stories) is to highly develop your NPCs. Know them and their history, that way you can adopt the NPC's character and from there determine how said NPC woudl react to any situation (old actors trick, sometimes it...