Fixed some warnings
Added json config file reading