line ending handling added -- CR+LF vs LF