created directories and prefs file if not available