What a great question. There are a LOT of things to keep in mind while writing a book--characterizations, plot, pacing, narrative flow, theme, mood--the list goes on and on. But for me the most important thing is to keep going, keep writing, keep exploring. It's easier to edit a chapter that goes wrong than to have nothing to work with. I read recently that the first draft is the author's way of telling the story to her/himself, and that's really true for me. So the most important thing to keep in mind is that you only fail when you stop writing.