complete writing loadfile for 2D populations, not tested