Andrew John Rainnie
Fantasy king Joe Abercrombie recently advised writers to get the first draft completed, no matter how bad it is, because then you have something to work with and restructure and rewrite as you need to, and in both screenwriting and prose I would agree with that.
The other thing I would say is pre-plan the writing. I usually come up with lengthy treatment documents before I begin writing, and try and stick as much to the structure I have set out. If I think of some amazing new idea that takes the story on a tangent, I'll keep it in a separate folder for when I come to rewrite it, otherwise you'll be caught in a constant cycle of revising and reworking a book that may never get finished.