support both CR and LF to simplify debugging with terminal