cleanup trailing whitespace
buffer flush