Banks have Fed as lender of last resort - so if Fed provides loans to banks, banks with liquidity problems seems to be OK. But in reality, banks fail when met only with liquidity problems. So is this due to Federal Reserve banks not willing to lend out money to these banks with liquidity problems?
Bank have their own Capital, Deposits from Depositors and lend money to Borrowers.
In a liquidity problem, it is typically that either the Borrowers are taking time to repay [they are not yet defaulters] or there is more pressure on withdrawals from Depositors or there is a short term of mismatch between deposits and loans ... in all these valid scenarios FED does lend out the banks to met these short terms obligations.
Banks fail when the losses are actually booked in comparison to the overall Capital or loss would materialize ... for example the Mortgage crisis in US meant that quite a few Banks the actual loss had materialized or would have any ways materialized. In such situations the short term leading does not help and they would burn it out anyways as the borrowers are not paying back any time soon ...