Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work.
If you don't make mistakes, you're not trying hard enough.
I don't think about my legacy. I just try to do good work.