Modified the script to allow for a config file