// withdraw empty lines, convert line feeds to \r\n