Refactor config files lookup