Punctuation. Grammar. Sentence structure. Prepositions. Proper spellings. It's overwhelming to write a book, and frankly that's far too mild a word. But don't get lost in the writing while you're writing...because you may forget about the storytelling.
I'm the first person to point to a misplaced comma or improperly capitalized word when it comes to published books. In fact, I've been known to go on full-scale rants when it comes to the mechanics of writing. I'm very interested in putting articles in the right place and avoiding the abuse of adverbs. I've gone 20 rounds with my very own employers about the existence of the word "alot" and I'll fixate on even the smallest mistakes when I find them. But I don't allow myself to get too bogged down in all that when I'm actually writing my own books. If I did, I wouldn't ever get past the first page.
The mechanics of writing are very important...but I've seen firsthand that it's not at all the most important thing about a book. I've read a half-dozen authors -- and I'm talking about well-known folks, here -- who in my opinion really can't write. Their structure is all off, their disregard for full sentences frightening and their propensity to avoid dialogue tags is way beyond unsettling. There are a lot of famous authors who don't pay a lot of attention to the mechanics of writing...but they're amazing storytellers, so I'm just about the only person who even cares.
When it come to storytelling vs. mechanics, it's always storytelling that wins out. So yes, edit your books. Try to use good grammar, and attempt to grasp the basics of punctuation. But don't get so bogged down in the details of the writing that the writing is all you think about. You need to keep your mind free to tell the story. In other words, you need to loosen up. Tell the story. Then go back and edit, and fix all those weird mistakes you made.