Regulator’s demand for written plan to fix problems at lender comes in wake of failed stress tests