added support for json config files and profiles