new version: optional json-encoder. load config file correctly