left white space at end of line when write buffer