have config loader take a log argument

and refactor embeded and load_default to load config from json