not connect to db if ignoresql is specified in config
refactor