Handle small .dat files correctly