Destiny and Choices

If we do something wrong in our lives that causes loss and changes our course, does that mistake change the path that was predetermined or is that mistake (that I now look back on with much regret) indeed part of our predetermined path?