When filing for bankruptcy and owing to a line of credit does the bank still keep the house even if this one is protected with a homestead insurance?

Generally speaking, when Chapter 7 bankruptcy is declared, it means a person's debt exceeds their assets. If the amount of debt owed to a mortgage bank for a home, the bank has no interest in taking a home which will not cover the mortgage debt. All debts are wiped away.