Improved the handling of the dat file loading