add newline which is required in tcp mode