clean whitespace before save