Updated model2.sh to correctly write the stat file