Fix error that caused random crap to be outputted to end of read files