Michael: fixed some newline problem in reading file