only write settings on exit
save oldpwd between sessions