fix bug with setting default config
move ErrorTopic to lib.js