Fix data file reading & remove trailing spaces