It certainly can, but the converse is also true. Some very messy thinking, when used as part of the learning process, can produce some very good writing, and some very messy writing can produce good thinking. Most writers do not construct their texts entirely in their heads before placing the ideas on paper. Most of us have learned that we need to work through our ideas on paper, clarifying them as we create multiple drafts. Many young writers don't realize this, however, and need to be introduced to the use of unpolished writing in the process of developing effective learning and communication.
Errors indicate absence of knowledge .
Sometimes this is true, but in the writing classroom, error often indicates that the developing writing is in the process of acquiring knowledge. Research has shown that writers will often produce more errors in the early stages of learning to write, but as they practice, they refine their knowledge and the errors diminish in number.