Write and read chromosome to/from file