I understand, writing up is quite a difficult stage, not easy to keep going. What helped me was that I set a deadline when I want to finish and then working backwards planned all work I have to do day by day. And also planned a reward for each stage completed. So, every morning I start with the aim what I want to accoplish today, work and if I finish early, go out have fun and enjoy my reward. Also having friends who ask frequently to report what have I done helps...
Keep my fingers crossed for you as well;)