Change HOST/PORT variable names. Use dict.get instead of direct access when accessing from app.config.