Best Buy Co., Inc. (NYSE: BBY) lost $10 million in its third quarter. Now, the troubled electronics retailer of Richfield, Minn., could lose another $27 million after a California jury ordered it to compensate a small tech firm that accused the retailer of stealing trade secrets. The penalty includes $5 million in punitive damages added by the judge.

The case revolves around a now-defunct Best Buy Guranteed BuyBack Program that allowed customers to trade in old gadgets and upgrade them for newer models. TechForward, once a privately held Los Angeles electronics buyback services provider that is now out of business, said Best Buy initially hired it to develop software to calculate the depreciated value of products for its program, then later scrapped the deal and came up with its own system using proprietary technology and breaching its contract with the small startup.

The retail giant has vowed to “vigorously challenge this verdict,” a spokeswoman told the Minneapolis StarTribune.  

Court documents revealed internal emails by Best Buy officials suggesting efforts were made to remove references to TechForward in file names.

Best Buy is facing a make-or-break period as consumer habits have shifted quickly toward embracing online commerce, especially for electronics goods. The company’s stock price has plummeted by over 48 percent since the start of a very troubling year. Company founder Richard Schulze is currently trying to take Best Buy private while CEO Hubert Joly is moving forward with his turnaround plan.