Added batch version for use with a config file.