Fixed writing of ase files