Added better checking that the wavelength calibration did not go crazy