Added line ending support