New save output

Saving diffraction intensities into different file formats
Checked the err, of intensities, if it is given is the same length