Added a check to ensure config file exists