fixed it to not overwrite data onto the disk it's trying to recover from

So, your version is writing tens of gigs of data to the very disk it's trying to recover from.

This modification changes it to compress the data and copy it over the network on the fly.