Updated to use config file