Moved out plugin config loading to an extra function