use print so cygwin prints correct NL
check for CR+LF, not just LF('\r\n')