Files saving almost done, at least .dat saving looks working exactly as it should.