If the outgoing stream has a newline, escape the line.  This code does not handle the newline for the import though.