It works, but corrupts the files.They're not repairable. Even if you could get it limping along again you could never trust anything written to it. Whether or not you wish to spend money on a replacement is completely irrelevant. It's dead. Replace it.
If it is corrupting files then it by definition is most definitely not working.It works, but corrupts the files.