Reapply local dir vairable after major mode change
Upgrade things