Cleaned up and debugged config bundle selector, and added error messages and sanity checks