Help with OSR command! Value of objective funtion is Inf!

I wrote a model incorpoarting bank’s balance sheet effect and tried to use osr command in computing optimal interest rate rule.
I use common objective function where inflation and output are included, and set weight to 1000 as it is said low values may cause difficulties.
Nevertheless, I can not obtain meaningful result. After interations dynare reports(code named bank1osr is attached):

Improvement on iteration 1001 = NaN
iteration count termination
icpi 1

       icy                  1

Objective function : Inf

where icpi and icy are parameters in interest rate rule. The model block has no problem and you can run impulse response as you like,while I just can not get optimal simple rule.
What has gone wrong??? I have no idea!!!
The code is attached. I really appreciate it if someone can help.
bank1osr.mod (3.68 KB)

I come to reply to myself…The problem comes from the model I borrow from Gertler and Karadi,in which a unit root exists. I therefore remove it by adding some adjustment costs.

you can verify the model of gertler and Karadi in web site .It is called NK_GK09