add hook for removing trailing whitespace on save