Fix XYZ writer

header and atom number where inversed