correctly escape newline