Mistakes aren't things to be discouraged. On the contrary, they should be cultivated and carefully investigated.
Carol Dweck, a psychologist at Standford, has spent decades demonstrating that one of the crucial ingredients of successful education is the ability to learn from mistakes.
. . . Unfortunately, children are often taught the exact opposite. Instead of praising kids for trying hard, teachers typically praise them for their innate intelligence. . . . This type of encouragement actually backfires, since it leads students to see mistakes as signs of stupidity and not as the building blocks of knowledge.