updated errors and fixed bug with bad lines in data file