Fixed error on creating dat-files