Writing Population to File