docs: def get_config_file():
      """ Return the loaded config file if one exists. """
  
      # config will be created here if we can't find one
      new_config_path = os.path.expanduser('~/.dagobahd.yml')
  
      config_dirs = ['/etc',
                     os.path.expanduser('~')]
      config_filenames = ['dagobahd.yml',
                          'dagobahd.yaml',
                          '.dagobahd.yml',
                          '.dagobahd.yaml']
  
      for directory in config_dirs:
          for filename in config_filenames:
              try:
                  if os.path.isfile(os.path.join(directory, filename)):
                      to_load = open(os.path.join(directory, filename))
                      config = yaml.load(to_load.read())
                      to_load.close()
                      replace_nones(config)
                      return config
              except:
                  pass
  
      # if we made it to here, need to create a config file
      # double up on notifications here to make sure first-time user sees it
      print 'Creating new config file in home directory'
      logging.info('Creating new config file in home directory')
      new_config = open(new_config_path, 'w')
      new_config.write(return_standard_conf())
      new_config.close()
  
      new_config = open(new_config_path, 'r')
      config = yaml.load(new_config.read())
      new_config.close()
      replace_nones(config)
      return config