Log-linearization in CF model

Hi all,
We need to use log-linear version in dynare, and I change all endogeneous variables to exp() form(I do not change parameters), for example, change

 q*cc^(-sigma) = beta*(cc(+1)^(-sigma))*(q(+1)*(1-delta)+r(+1));

into

exp(q)*exp(cc)^(-sigma) = beta*(exp(cc(+1))^(-sigma))*(exp(q(+1))*(1-delta)+exp(r(+1)));.

And I also change initial values from

 omegab  = 0.59455;
    PHI     = normcdf((log(omegab)-M)/S);
    phi     = normpdf((log(omegab)-M)/S) / (omegab*S);
    g       = normcdf((log(omegab)-M)/S - S) - PHI*mu + (1-PHI)*omegab;
    f       = 1-mu*PHI- g;
    q       = 1/(1-mu*0.01+(gamma-1)*f);
    r       = q*((1-beta*(1-delta))/beta);
    H       = .3;
    He      = eta;

into

    omegab  = 0.59455;
    PHI     = normcdf((log(omegab)-M)/S);
    phi     = normpdf((log(omegab)-M)/S) / (omegab*S);
    g       = normcdf((log(omegab)-M)/S - S) - PHI*mu + (1-PHI)*omegab;
    f       = 1-mu*PHI- g;
    q       = ln(1/(1-mu*0.01+(gamma-1)*f));
    r       = ln(exp(q)*((1-beta*(1-delta))/beta));
    H       = ln(0.3);
    He      = ln(eta);

Before I take exponential, I can find a steady state and I have checked that no variables are 0 before they are taken log. (The shock innovation ezA and ezMU are 0 in steady state, and I did not take log of them.)
But after I change variables into exp() form, I cannot find steady state anymore.
Could you please tell me where I am wrong?
Thanks a lot!!!

As in [Error Syntax "Unexpected EXP"] it is difficult to say without having the entire mod file and knowing the status of the objects (parameters vs. endogenous variables).

That said, there is probably something wrong in the antepenultimate line of the block for the initial values, where you replace q by \log e^q… The two expressions are equivalent, so you did not change anything here.

Best,
Stéphane.

Let me add that there are better ways of achieving a log-linearization. See