Fixed up writing so it only sends newlines