So then you stop and do a reverse outline, which is basically going through paragraph by paragraph (for a paper) or scene by scene (for a novel), and writing down what you've done. In that process, you can discover holes, places that could use more energy, etc. and so on. So you make notes on that, and then you go back and fix it -- maybe you end up deleting an entire section as extraneous, or adding in a few to clarify matters.
I find reverse outlines really useful, though it sure would be nice if it came out perfectly the first time!