Typicaally, they can foreclose unless you affirm, or agree to keep paying under mutually agreeable terms, the loan; construction loans usually involve giving the lender a security interest, like a mortgage, and if they have such an interest, filing for bankrupty will only delay, not prevent, foreclosure unless you affirm the loan.