Move app dir logic from Main to Settings