No one is perfect in this world and we all make mistake at many occasions but it doesn't mean that lying is the best option.
Nooooo... Neverrr.....
If you try to hide your mistake just to prevent from defaming then let me tell you that when you lie and if someone will catch your lie then you will have to lie another time to hide your lie and then the chain will develop to lie to hide your lie.
Always try to accept your mistakes and try to learn from it and not to repeat it. But if you once lie to hide your mistakes then you will have to lie many times to hide the untruth.
I have experienced it because I was hiding my mistake and I told a lie then someone caught my mistake and I had to lie again to cover it. So remember if you lie then a chain will develop that forces you keep lying and liar has no respect in the environment.