close #29, write best fit parameters to file