Function to create calibration file