Extract plugin config loading from main file into plugin file.