strip trailing whitespace on save