Fixed logging, added .dat logger