Add a history entry to the header when writing out a FITS file