Load all config from one file and fix some bugs