Don’t throw good money after bad.
Imagine you’ve sunk $100,000 into a project. Another $10,000 and it will be completed. But market conditions have changed and you’ll only recoup $25,000.
A colleague discovers an open-source code that will generate the same $25,000 return for an investment of only $8,000 total.
Do you go for the first option and complete the $110,000 project?
Or do you abandon the $100,000 and go for the cheaper new alternative?