Added line ending logic