updated controller with file reading and sample config file