If you mess up, 'fess up.
No one likes to get into trouble. It not easy to admit a mistake.
As a child, my dad used to tell me that all he had to do was to put his finger up at me and I would start crying. Unfortunately, out of three children, I have only 1 that responds this way (my sweet Emma Jo.) The other two deal with being wrong in other ways: Mann gets angry and Daniel lies. I know that my 7th graders are quick to either point the finger at anyone else for their own actions or to lie to get out of trouble as well. And from what I can tell, adults also often use these same defense mechanisms for trying to get themselves out of trouble.
But what does getting angry accomplish? YOU messed up and then you blame someone else and get angry at them. Some people are so good at this that they actually convince themselves that they made no mistake.
And lying. This is the one that I have been guilty of. When I mess up, I automatically try to figure out a way out of it by lying. Of course this doesn't work either and you are going to end up digging yourself into a bigger hole and upsetting people around you even more.
The right thing to do is to admit you are wrong and say you are sorry. It's not the easiest, but it's the right thing to do.