Raise exception for invalid datafile format.