fix download plugin

also use config.js for config vars instead of leveldb