I find when I'm writing, that I write it all down as I think. Every thought and idea that comes into my mind. When something disturbs me, either I keep writing and by doing so manage to keep the thread of my thoughts, or I lose it, but have everything else I wrote.
Reading through what I thought and the ideas I have, often I pick up the thread where it was cut before and can continue to write as I did. By doing it this way, I stop writing down ideas when I feel I've written enough, or when I feel the ideas are no longer relevant, then read through and expand on everything else I've written.
You could perhaps though take a short break before continuing on again. When you get interrupted your mind gets a little jumbled and may take a little bit to focus again. Just calm your mind down, take ten minutes to have a drink, then sit back down and try again.
Hopefully some of this helps.
