Error in replication Fernández-Villaverde et al.(2015)("Fiscal Volatility Shocks and Economic Activity")

Hello everyone
I am trying to replicate the code file of 2015 AER paper “Fiscal Volatility Shocks and Economic Activity” by Fernández-Villaverde et al. When I run the code file “main_code_FGKR.mod” which provided by the author in AER web, I found that the model equations in the code file are not the same as those in the paper. For example, in the paper, the FOC of private consumption is 1 , but in the code file, this equation is written as exp(dt)/(exp(ct)-habitexp(ct(-1))/exp(gzt))^ome - exp(dt(1))habitbet/(exp(ct(1))exp(gzt(1))-habitexp(ct))^ome= exp(lamt)(1+tauct), according to this expression, the FOC of private consumption should be 2 why does the author add the At in the code file? And how to introduce the “At” for other endogenous variables? Besides, there are two problems when I am trying to run the code file:
(1) When I run the “main_code_FGKR.mod”, the matlab could not get the results, and it shows as follows:
The function ‘RunDynarePruning’ corresponding to the input parameter of ‘struct’ is not defined.
Error author_maincode_practise (line 707)
outDynare = RunDynarePruning(optPruning,oo_,M_,f_11);
Error dynare (line 180)
Evalin(‘base’,fname) ;
How should I solve this problem?
(2) I read a lot of related topics in this forum, and I saw that the professor Jpfeifer recommended third-order algorithms in other posts, then I changed the code file by deleting section of " 5. Run Dynare with pruning" in the code file, and use the command stoch_simul(order = 3, pruning,k_order_solver,noprint,irf=40) directly to get the IRFs, but the IRFs are very weird, IRFs are very different from those in paper, why did I get different results? And how to get the same results as the author?
Looking forward to your reply! thanks a lot!
I have uploaded the author’s code and the weird IRFs.
main_code_FGKR.mod (21.8 KB)
IRFs to capital volatility shock.pdf (172.0 KB)