code: function addConfig(config) {
  	lDebug('Check configuration');
  
  	if(!config.root_path) {
      throw new Error('Config need root_path');
    }
  
    if(config.root_path.substr(-1) !== '/') {
      config.root_path += '/';
    }
  
  	if(!config) {
  		config = {};
  	}
  
  	const envs = [
  		{name: 'rtorrent_host', default: '127.0.0.1'},
  		{name: 'rtorrent_port', default: '8080'},
  		{name: 'rtorrent_path', default: '/RPC2'},
      {name: 'dir_torrent', default: `${config.root_path}dtorrent/torrent/`},
      {name: 'dir_downloaded', default: `${config.root_path}dtorrent/downloaded/`},
      {name: 'dir_log', default: `${config.root_path}dtorrent/logs/`},
  	];
  
  	for(const i in envs) {
  		if(config && config[envs[i].name]) {
  			process.env[envs[i].name.toUpperCase()] = config[envs[i].name];
  		} else if(!process.env[envs[i].name.toUpperCase()]) {
  			process.env[envs[i].name.toUpperCase()] = envs[i].default;
  		}
  	}
  
  	const configs = [
  		{name: 'interval_check', default: 1500},
  		{name: 'client', default: require('./src/clients/rTorrent')}
  	];
  
  	for(const i in configs) {
  		if(config && config[configs[i].name]) {
  			config[configs[i].name] = config[configs[i].name];
  		} else {
  			config[configs[i].name] = configs[i].default;
  		}
  	}
  
  	return config;
  }
docs: Add config
  @param config