I am not sure if this will help but I think it depends on your state and what the bankruptcy allows. I have comes across the same issue and have talked to a bankruptcy attorney here in Illinois. She said even if they file for bankruptcy they still may lose the house because they need to be able to get current and stay current or they will still go through foreclosure. This is for Illinois.
If I received wrong info please let me know!!
keeping their house while in Bankruptcy is complicated. Are they filing Chapter 7 or Chapter 13? Below is an exerpt on this issue from Attorney David J. Kelly which I find helpful:
http://www.mn-bankruptcy.com/housecar.html