bugs found in saving the calibrated parameters to a file