added changes for using config files and not json files