Text datafile reading: misplaced error message fixed