Index: src/sas/sasgui/guiframe/CategoryInstaller.py
===================================================================
--- src/sas/sasgui/guiframe/CategoryInstaller.py	(revision 65f39301a9c81af2f10a086dec2a40fcaf25a0bc)
+++ src/sas/sasgui/guiframe/CategoryInstaller.py	(revision 6e50a8d413a9ee39f4e97836486b9f343ad3f470)
@@ -15,4 +15,6 @@
 from collections import defaultdict, OrderedDict
 
+from sas.sasgui import get_user_dir
+
 USER_FILE = 'categories.json'
 
@@ -25,7 +27,4 @@
     Note - class is entirely static!
     """
-
-    def __init__(self):
-        """ initialization """
 
     @staticmethod
@@ -104,5 +103,5 @@
         returns the user data file, eg .sasview/categories.json.json
         """
-        return os.path.join(CategoryInstaller._get_home_dir(), USER_FILE)
+        return os.path.join(get_user_dir(), USER_FILE)
 
     @staticmethod
Index: src/sas/sasgui/guiframe/__init__.py
===================================================================
--- src/sas/sasgui/guiframe/__init__.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/guiframe/__init__.py	(revision 5a405bda2da663894b6b32ab94768a91d60525a4)
@@ -14,5 +14,5 @@
     # Check for data path next to exe/zip file.
     # If we are inside a py2exe zip file, we need to go up
-    # to get to the directory containing 
+    # to get to the directory containing
     # the media for this module
     path = os.path.dirname(__file__)
@@ -27,5 +27,5 @@
                 return module_media_path
             return media_path
-   
+
     raise RuntimeError('Could not find guiframe images files')
 
@@ -40,5 +40,5 @@
     # Check for data path next to exe/zip file.
     # If we are inside a py2exe zip file, we need to go up
-    # to get to the directory containing 
+    # to get to the directory containing
     # the media for this module
     path = os.path.dirname(__file__)
@@ -58,5 +58,5 @@
     """
     Return the data files associated with guiframe images .
-    
+
     The format is a list of (directory, [files...]) pairs which can be
     used directly in setup(...,data_files=...) for setup.py.
@@ -64,10 +64,6 @@
     """
     data_files = []
-    path = get_data_path(media="images")
-    for f in findall(path):
-        data_files.append(('images/icons', [f]))
-    path = get_media_path(media="media")
-    for f in findall(path):
-        data_files.append(('media/guiframe_media', [f]))
+    data_files.append(('images/icons', findall(get_data_path("images"))))
+    data_files.append(('media/guiframe_media', findall(get_data_path("media"))))
 
     return data_files
Index: src/sas/sasgui/guiframe/aboutbox.py
===================================================================
--- src/sas/sasgui/guiframe/aboutbox.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/guiframe/aboutbox.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
@@ -24,18 +24,7 @@
 import os.path
 import os
-try:
-    # Try to find a local config
-    import imp
-    path = os.getcwd()
-    if(os.path.isfile("%s/%s.py" % (path, 'local_config'))) or \
-      (os.path.isfile("%s/%s.pyc" % (path, 'local_config'))):
-        fObj, path, descr = imp.find_module('local_config', [path])
-        config = imp.load_module('local_config', fObj, path, descr)
-    else:
-        # Try simply importing local_config
-        import local_config as config
-except:
-    # Didn't find local config, load the default
-    import config
+
+from sas.sasgui import get_local_config
+config = get_local_config()
 
 def launchBrowser(url):
Index: src/sas/sasgui/guiframe/acknowledgebox.py
===================================================================
--- src/sas/sasgui/guiframe/acknowledgebox.py	(revision 74c8cd08df1c5d3f23477827c0f272e88bbbea9d)
+++ src/sas/sasgui/guiframe/acknowledgebox.py	(revision 74c8cd08df1c5d3f23477827c0f272e88bbbea9d)
@@ -12,22 +12,7 @@
 import wx.lib.hyperlink
 from wx.lib.expando import ExpandoTextCtrl
-import random
-import os.path
-import os
-try:
-    # Try to find a local config
-    import imp
-    path = os.getcwd()
-    if(os.path.isfile("%s/%s.py" % (path, 'local_config'))) or \
-      (os.path.isfile("%s/%s.pyc" % (path, 'local_config'))):
-        fObj, path, descr = imp.find_module('local_config', [path])
-        config = imp.load_module('local_config', fObj, path, descr)
-    else:
-        # Try simply importing local_config
-        import local_config as config
-except:
-    # Didn't find local config, load the default
-    import config
 
+from sas.sasgui import get_local_config
+config = get_local_config()
 
 class DialogAcknowledge(wx.Dialog):
Index: src/sas/sasgui/guiframe/config.py
===================================================================
--- src/sas/sasgui/guiframe/config.py	(revision d9089328dec4c154a6bac2735e52b5e6fb3c8af2)
+++ src/sas/sasgui/guiframe/config.py	(revision d9089328dec4c154a6bac2735e52b5e6fb3c8af2)
@@ -1,4 +1,4 @@
 """
-    Application settings
+Application settings
 """
 from __future__ import print_function
@@ -6,8 +6,8 @@
 import time
 import os
+import logging
+
 from sas.sasgui.guiframe.gui_style import GUIFRAME
 import sas.sasview
-import logging
-
 
 logger = logging.getLogger(__name__)
@@ -75,4 +75,5 @@
 _ansto_logo = os.path.join(icon_path, "ansto_logo.png")
 _tudelft_logo = os.path.join(icon_path, "tudelft_logo.png")
+_dls_logo = os.path.join(icon_path, "dls_logo.png")
 _nsf_logo = os.path.join(icon_path, "nsf_logo.png")
 _danse_logo = os.path.join(icon_path, "danse_logo.png")
@@ -147,4 +148,7 @@
 SAS_OPENCL = None
 
+# Time out for updating sasview
+UPDATE_TIMEOUT = 2
+
 def printEVT(message):
     if __EVT_DEBUG__:
Index: src/sas/sasgui/guiframe/customdir.py
===================================================================
--- src/sas/sasgui/guiframe/customdir.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/guiframe/customdir.py	(revision c6bdb3b56ff2c1bf95baa3241ca1df10d74a79d7)
@@ -1,68 +1,59 @@
 # Setup and find Custom config dir
+from __future__ import print_function
+
 import os.path
+import logging
 import shutil
 
-CONF_DIR = 'config' 
-APPLICATION_NAME = 'sasview'
+from sasmodels.custom import load_module_from_path
 
-def _find_usersasview_dir():
-    """
-    Find and return user/.sasview dir
-    """
-    return os.path.join(os.path.expanduser("~"), ("." + APPLICATION_NAME))
+from sas.sasgui import get_custom_config_path, get_app_dir
 
-def _find_customconf_dir():
-    """
-    Find path of the config directory.
-    The plugin directory is located in the user's home directory.
-    """
-    u_dir = _find_usersasview_dir()
-    return os.path.join(u_dir, CONF_DIR)
+logger = logging.getLogger(__name__)
 
-def _setup_conf_dir(path):
+_config_cache = None
+def setup_custom_config():
     """
     Setup the custom config dir and cat file
     """
-    conf_dir = _find_customconf_dir()
-    # If the plugin directory doesn't exist, create it
-    if not os.path.isdir(conf_dir):
-        os.makedirs(conf_dir)
-    config_file = os.path.join(conf_dir, "custom_config.py")
-
-    # Place example user models as needed
-    try:
-        if not os.path.isfile(config_file):
-            shutil.copyfile(os.path.join(path, "custom_config.py"), config_file)
-
-        #Adding SAS_OPENCL if it doesn't exist in the config file
-        # - to support backcompability
-        if not "SAS_OPENCL" in open(config_file).read():
-            open(config_file,"a+").write("SAS_OPENCL = \"None\"\n")
-    except:
-        # Check for data path next to exe/zip file.
-        #Look for maximum n_dir up of the current dir to find plugins dir
-        n_dir = 12
-        is_dir = False
-        f_dir = path
-        for i in range(n_dir):
-            if i > 1:
-                f_dir, _ = os.path.split(f_dir)
-            temp_path = os.path.join(f_dir, "custom_config.py")
-            if os.path.isfile(temp_path):
-                shutil.copyfile(temp_path, config_file)
-                is_dir = True
-                break
-        if not is_dir:
-            raise
-    return conf_dir
+    global _config_cache
+    if not _config_cache:
+        _config_cache = _setup_custom_config()
+    return _config_cache
 
 
-class SetupCustom(object):
-    """
-    implement custom config dir
-    """
-    def find_dir(self):
-        return _find_customconf_dir()
-    
-    def setup_dir(self, path):
-        return _setup_conf_dir(path)
+def _setup_custom_config():
+    path = get_custom_config_path()
+    if not os.path.isfile(path):
+        try:
+            # if the custom config file does not exist, copy the default from
+            # the app dir
+            shutil.copyfile(os.path.join(get_app_dir(), "custom_config.py"),
+                            path)
+        except Exception:
+            logger.error("Could not copy default custom config.")
+
+    #Adding SAS_OPENCL if it doesn't exist in the config file
+    # - to support backcompability
+    if not "SAS_OPENCL" in open(path).read():
+        try:
+            open(config_file, "a+").write("SAS_OPENCL = \"None\"\n")
+        except Exception:
+            logger.error("Could not update custom config with SAS_OPENCL.")
+
+    custom_config = _load_config(path)
+    return custom_config
+
+
+def _load_config(path):
+    if os.path.exists(path):
+        try:
+            module = load_module_from_path('sas.sasview.custom_config', path)
+            logger.info("GuiManager loaded %s", path)
+            return module
+        except Exception as exc:
+            logger.error("Error loading %s: %s", path, exc)
+
+    from sas.sasview import custom_config
+    logger.info("GuiManager custom_config defaults to sas.sasview.custom_config")
+    return custom_config
Index: src/sas/sasgui/guiframe/data_panel.py
===================================================================
--- src/sas/sasgui/guiframe/data_panel.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
+++ src/sas/sasgui/guiframe/data_panel.py	(revision c6bdb3b56ff2c1bf95baa3241ca1df10d74a79d7)
@@ -33,5 +33,7 @@
 from sas.sasgui.guiframe.local_perspectives.plotting.SimplePlot \
     import PlotFrame as QucikPlotDialog
-import sas.sasgui.guiframe.config as config
+from sas.sasgui import get_local_config
+
+config = get_local_config()
 
 # Check version
Index: src/sas/sasgui/guiframe/documentation_window.py
===================================================================
--- src/sas/sasgui/guiframe/documentation_window.py	(revision 2746eab3d2fd36206508d585c8b2ed061fabce96)
+++ src/sas/sasgui/guiframe/documentation_window.py	(revision 2746eab3d2fd36206508d585c8b2ed061fabce96)
@@ -27,5 +27,5 @@
     WX_SUPPORTS_HTML2 = False
 
-from .gui_manager import get_app_dir
+from sas.sasgui import get_app_dir
 
 # Don't use wx html renderer on windows.
Index: src/sas/sasgui/guiframe/gui_manager.py
===================================================================
--- src/sas/sasgui/guiframe/gui_manager.py	(revision 2f22db96dce134a5ac8f4dba0b22c4df370c5431)
+++ src/sas/sasgui/guiframe/gui_manager.py	(revision 2f22db96dce134a5ac8f4dba0b22c4df370c5431)
@@ -22,10 +22,11 @@
 import re
 import logging
-import httplib
 import traceback
 import urllib
-import urllib2
 import json
 
+from matplotlib import _pylab_helpers
+
+from sas.sasgui import get_local_config, get_app_dir, get_user_dir
 from sas.sasgui.guiframe.events import EVT_CATEGORY
 from sas.sasgui.guiframe.events import EVT_STATUS
@@ -46,102 +47,11 @@
 from sas.sascalc.dataloader.loader import Loader
 from sas.sasgui.guiframe.proxy import Connection
-from matplotlib import _pylab_helpers
+from sas.sasgui.guiframe.customdir import setup_custom_config
 
 logger = logging.getLogger(__name__)
-
 warnings.simplefilter("ignore")
 
-def get_app_dir():
-    """
-        The application directory is the one where the default custom_config.py
-        file resides.
-
-        :returns: app_path - the path to the applicatin directory
-    """
-    # First, try the directory of the executable we are running
-    app_path = sys.path[0]
-    if os.path.isfile(app_path):
-        app_path = os.path.dirname(app_path)
-    if os.path.isfile(os.path.join(app_path, "custom_config.py")):
-        app_path = os.path.abspath(app_path)
-        logger.info("Using application path: %s", app_path)
-        return app_path
-
-    # Next, try the current working directory
-    if os.path.isfile(os.path.join(os.getcwd(), "custom_config.py")):
-        logger.info("Using application path: %s", os.getcwd())
-        return os.path.abspath(os.getcwd())
-
-    # Finally, try the directory of the sasview module
-    # TODO: gui_manager will have to know about sasview until we
-    # clean all these module variables and put them into a config class
-    # that can be passed by sasview.py.
-    logger.debug(sys.executable)
-    logger.debug(str(sys.argv))
-    from sas import sasview as sasview
-    app_path = os.path.dirname(sasview.__file__)
-    logger.debug("Using application path: %s", app_path)
-    return app_path
-
-
-def get_user_directory():
-    """
-        Returns the user's home directory
-    """
-    userdir = os.path.join(os.path.expanduser("~"), ".sasview")
-    if not os.path.isdir(userdir):
-        os.makedirs(userdir)
-    return userdir
-
-
-def _find_local_config(file, path):
-    """
-        Find configuration file for the current application
-    """
-    config_module = None
-    fObj = None
-    try:
-        fObj, path_config, descr = imp.find_module(file, [path])
-        config_module = imp.load_module(file, fObj, path_config, descr)
-    except:
-        logger.error("Error loading %s/%s: %s" % (path, file, sys.exc_value))
-    finally:
-        if fObj is not None:
-            fObj.close()
-    logger.debug("GuiManager loaded %s/%s" % (path, file))
-    return config_module
-
-# Get APP folder
-PATH_APP = get_app_dir()
-DATAPATH = PATH_APP
-
-# GUI always starts from the App folder
-# os.chdir(PATH_APP)
-# Read in the local config, which can either be with the main
-# application or in the installation directory
-config = _find_local_config('local_config', PATH_APP)
-if config is None:
-    config = _find_local_config('local_config', os.getcwd())
-    if config is None:
-        # Didn't find local config, load the default
-        import sas.sasgui.guiframe.config as config
-        logger.debug("using default local_config")
-    else:
-        logger.debug("found local_config in %s" % os.getcwd())
-else:
-    logger.debug("found local_config in %s" % PATH_APP)
-
-from sas.sasgui.guiframe.customdir import SetupCustom
-c_conf_dir = SetupCustom().setup_dir(PATH_APP)
-custom_config = _find_local_config('custom_config', c_conf_dir)
-if custom_config is None:
-    custom_config = _find_local_config('custom_config', os.getcwd())
-    if custom_config is None:
-        msgConfig = "Custom_config file was not imported"
-        logger.debug(msgConfig)
-    else:
-        logger.debug("using custom_config in %s" % os.getcwd())
-else:
-    logger.debug("using custom_config from %s" % c_conf_dir)
+config = get_local_config()
+custom_config = setup_custom_config()
 
 # read some constants from config
@@ -177,5 +87,5 @@
         DEFAULT_OPEN_FOLDER = os.path.abspath(open_folder)
     else:
-        DEFAULT_OPEN_FOLDER = PATH_APP
+        DEFAULT_OPEN_FOLDER = get_app_dir()
     SAS_OPENCL = custom_config.SAS_OPENCL
 except:
@@ -192,4 +102,5 @@
     DEFAULT_PERSPECTIVE = None
     CLEANUP_PLOT = False
+    DEFAULT_OPEN_FOLDER = get_app_dir()
     DEFAULT_OPEN_FOLDER = PATH_APP
     SAS_OPENCL = None
@@ -265,5 +176,5 @@
                 if os.path.isfile(ico_file):
                     self.SetIcon(wx.Icon(ico_file, wx.BITMAP_TYPE_ICO))
-        self.path = PATH_APP
+        self.path = get_app_dir()
         self.application_name = APPLICATION_NAME
         # Application manager
@@ -540,7 +451,7 @@
         try:
             fd = open(file_name, 'w')
-        except:
+        except Exception:
             # On Permission denied: IOError
-            temp_dir = get_user_directory()
+            temp_dir = get_user_dir()
             temp_file_name = os.path.join(temp_dir, name)
             fd = open(temp_file_name, 'w')
@@ -1532,5 +1443,5 @@
             # want Analysis.  This is NOT an issue on the Mac which does not
             # have the extra Window menu item.
-            #      March 2016 Code Camp  -- PDB 
+            #      March 2016 Code Camp  -- PDB
             Tools_pos = self._menubar.FindMenu("Tools")
             self._menubar.Insert(Tools_pos+1, self._applications_menu,
@@ -2163,4 +2074,5 @@
                 logger.info("Failed to connect to www.sasview.org")
         self._process_version(version_info, standalone=event is None)
+
 
     def _process_version(self, version_info, standalone=True):
@@ -3351,5 +3263,5 @@
                 if basename.lower() in [app_py, app_exe, app_app, app_base]:
                     data_base = sys.argv[1]
-                    input_file = os.path.normpath(os.path.join(DATAPATH,
+                    input_file = os.path.normpath(os.path.join(get_app_dir(),
                                                                data_base))
         if input_file is None:
@@ -3366,5 +3278,5 @@
         # do it only the first time app loaded
         # delete unused model folder
-        model_folder = os.path.join(PATH_APP, path)
+        model_folder = os.path.join(get_app_dir(), path)
         if os.path.exists(model_folder) and os.path.isdir(model_folder):
             if len(os.listdir(model_folder)) > 0:
Index: src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py	(revision dcb91cf83e474bdbe1c788d87690ca5f5e7841cb)
+++ src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py	(revision dcb91cf83e474bdbe1c788d87690ca5f5e7841cb)
@@ -12,27 +12,12 @@
 from sas.sascalc.dataloader.loader import Loader
 from sas.sascalc.dataloader.loader_exceptions import NoKnownLoaderException
+
+from sas.sasgui import get_local_config
 from sas.sasgui.guiframe.plugin_base import PluginBase
 from sas.sasgui.guiframe.events import StatusEvent
 from sas.sasgui.guiframe.gui_style import GUIFRAME
 from sas.sasgui.guiframe.gui_manager import DEFAULT_OPEN_FOLDER
-try:
-    # Try to find a local config
-    import imp
-    path = os.getcwd()
-    if(os.path.isfile("%s/%s.py" % (path, 'local_config'))) or \
-        (os.path.isfile("%s/%s.pyc" % (path, 'local_config'))):
-        fObj, path, descr = imp.find_module('local_config', [path])
-        config = imp.load_module('local_config', fObj, path, descr)
-    else:
-        # Try simply importing local_config
-        import local_config as config
-except:
-    # Didn't find local config, load the default
-    import sas.sasgui.guiframe.config as config
-
-if config is None:
-    import sas.sasgui.guiframe.config as config
-
-
+
+config = get_local_config()
 extension_list = []
 if config.APPLICATION_STATE_EXTENSION is not None:
Index: src/sas/sasgui/guiframe/startup_configuration.py
===================================================================
--- src/sas/sasgui/guiframe/startup_configuration.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/guiframe/startup_configuration.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
@@ -1,7 +1,6 @@
-
 ################################################################################
 #This software was developed by the University of Tennessee as part of the
 #Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
-#project funded by the US National Science Foundation. 
+#project funded by the US National Science Foundation.
 #
 #See the license text in license.txt
@@ -9,13 +8,15 @@
 #copyright 2009, University of Tennessee
 ################################################################################
+import os
+import copy
+
 import wx
-import os
-import sys
-import copy
-#import sas.sasgui.guiframe.gui_manager as gui
-from sas.sasgui.guiframe.events import StatusEvent  
+
+from sas.sasgui import get_custom_config_path
+from sas.sasgui.guiframe.events import StatusEvent
 from sas.sasgui.guiframe.gui_style import GUIFRAME
 from sas.sasgui.guiframe import gui_manager as CURRENT
-from sas.sasgui.guiframe.customdir  import SetupCustom
+
+
 # default configuration
 DEFAULT_STRINGS = {'GUIFRAME_WIDTH':-1,
@@ -62,11 +63,10 @@
     """
     def __init__(self, parent, gui, id=-1, title="Startup Setting"):
-        wx.Dialog.__init__(self, parent, id, title, 
+        wx.Dialog.__init__(self, parent, id, title,
                            size=(PANEL_WIDTH, PANEL_HEIGHT))
         # parent
         self.parent = parent
-        self.path = SetupCustom().find_dir()
         self._gui = gui
-        # font size 
+        # font size
         self.SetWindowVariant(variant=FONT_VARIANT)
         self.current_string = copy.deepcopy(CURRENT_STRINGS)
@@ -76,5 +76,5 @@
         title_text = wx.StaticText(self, id=wx.NewId(), label='Set interface configuration')
 
-        default_bt = wx.RadioButton(self, -1, 'Default View', (15, 30), 
+        default_bt = wx.RadioButton(self, -1, 'Default View', (15, 30),
                                     style=wx.RB_GROUP)
         default_bt.Bind(wx.EVT_RADIOBUTTON, self.OnDefault)
@@ -87,8 +87,8 @@
         note_txt = wx.StaticText(self, -1, msg, (15, 75))
         note_txt.SetForegroundColour("black")
-        
+
         hbox = wx.BoxSizer(wx.HORIZONTAL)
         okButton = wx.Button(self, wx.ID_OK, 'Set', size=(70, 25))
-        closeButton = wx.Button(self,wx.ID_CANCEL, 'Cancel', size=(70, 25))
+        closeButton = wx.Button(self, wx.ID_CANCEL, 'Cancel', size=(70, 25))
         hbox.Add(closeButton, 1, wx.RIGHT, 5)
         hbox.Add(okButton, 1, wx.RIGHT, 5)
@@ -102,5 +102,5 @@
         self.SetSizer(vbox)
 
-        
+
     def OnDefault(self, event=None):
         """
@@ -111,5 +111,5 @@
         self.return_string = copy.deepcopy(DEFAULT_STRINGS)
         return self.return_string
-        
+
     def OnCurrent(self, event=None):
         """
@@ -134,5 +134,5 @@
                 p_size = CURRENT_STRINGS['PLOPANEL_WIDTH']
             self.current_string['PLOPANEL_WIDTH'] = p_size
-            
+
             try:
                 control_frame = self.parent.get_current_perspective().frame
@@ -143,10 +143,10 @@
                 self.current_string['CONTROL_WIDTH'] = -1
                 self.current_string['CONTROL_HEIGHT'] = -1
-                
+
             data_pw, _ = self.parent.panels["data_panel"].frame.GetSizeTuple()
             if data_pw is None:
                 data_pw = CURRENT_STRINGS['DATAPANEL_WIDTH']
             self.current_string['DATAPANEL_WIDTH'] = data_pw
-            
+
             #label = self.parent._data_panel_menu.GetText()
             label = self.parent.panels['data_panel'].frame.IsShown()
@@ -155,16 +155,16 @@
             else:
                 self.current_string['DATALOADER_SHOW'] = False
-                
+
             if self.parent._toolbar.IsShown():
                 self.current_string['TOOLBAR_SHOW'] = True
             else:
                 self.current_string['TOOLBAR_SHOW'] = False
-                
+
             style = self._gui & GUIFRAME.FLOATING_PANEL
-            if style == GUIFRAME.FLOATING_PANEL: 
+            if style == GUIFRAME.FLOATING_PANEL:
                 self.current_string['FIXED_PANEL'] = False
             else:
                 self.current_string['FIXED_PANEL'] = True
-                
+
             if self.parent.panels['default'].frame.IsShown():
                 self.current_string['WELCOME_PANEL_SHOW'] = True
@@ -182,5 +182,5 @@
             self.current_string['DEFAULT_OPEN_FOLDER'] = location
                         #self.parent._default_save_location.ascii_letters
-            
+
         except:
             raise
@@ -188,29 +188,17 @@
         self.return_string = self.current_string
         return self.return_string
-    
+
+
     def write_custom_config(self):
         """
-            Write custom configuration
-        """
-        fname = os.path.join(self.path, 'custom_config.py')
-        self.write_string(fname, self.return_string)
-
-    def write_string(self, fname, strings):
-        """
-        Write and Save file
-        """
-        
-        try:
-            out_f =  open(fname,'w')
-        except :
-            raise  #RuntimeError, "Error: Can not change the configuration..."
-        out_f.write("#Application appearance custom configuration\n" )
-        for key, item in strings.iteritems():
-            if (key == 'DEFAULT_PERSPECTIVE') or \
-                (key == 'DEFAULT_OPEN_FOLDER' and item is not None):
-                out_f.write("%s = \"%s\"\n" % (key,str(item)))
-            else:
-                out_f.write("%s = %s\n" % (key,str(item)))
-    
-        out_f.close() 
-        
+        Write custom configuration
+        """
+        path = get_custom_config_path()
+        with open(path, 'w') as out_f:
+            out_f.write("#Application appearance custom configuration\n")
+            for key, item in self.return_string.iteritems():
+                if (key == 'DEFAULT_PERSPECTIVE') or \
+                    (key == 'DEFAULT_OPEN_FOLDER' and item != None):
+                    out_f.write("%s = \"%s\"\n" % (key, str(item)))
+                else:
+                    out_f.write("%s = %s\n" % (key, str(item)))
