saving files before refreshing line endings