The best way to stop foreclosures and modify mortgates is to foreclose on all the people not paying their mortgage. Once you do that, you won’t need to foreclose anymore.
Also, the loan gets modified such that the new loan belongs to someone more reliable and solvent.