Conditionally add newline to data returned