diff --git a/src/libs/db/mongoose.js b/src/libs/db/mongoose.js
index d8594158aba29c2c732e8e348bca7930fbb84e73..f9d2ed8ef59767e262f77fa21e2a93d444139145 100644
--- a/src/libs/db/mongoose.js
+++ b/src/libs/db/mongoose.js
@@ -11,7 +11,7 @@ mongoose.Promise = global.Promise;
 module.exports = () => {
     // Get mongodb URI (ip and port) in config file
     const mongoUri = process.env.MONGO_URI || config.mongodb.uri;
-    log.debug(`Connecting to MongoDB on URI ${mongoUri}`);
+    log.info(`Connecting to MongoDB on URI ${mongoUri}`);
     // Connection singleton
     const db = mongoose.connect(mongoUri);
 
diff --git a/src/libs/jobs/download.js b/src/libs/jobs/download.js
index bf76afd2e6f86cf14953d22942d67584915aa4a7..14eb05b5024164a6c6758f2487ecb77084968a87 100644
--- a/src/libs/jobs/download.js
+++ b/src/libs/jobs/download.js
@@ -3,29 +3,21 @@ const log = require(`${libs}/log`)(module);
 const execQuery = require(`${libs}/db/query_exec`);
 const jsonexport = require('jsonexport');
 const fs = require('fs');
+const Readable = require('stream').Readable;
 
 module.exports = function(agenda) {
     agenda.define('download database', (job, done) => {
         let sql = job.attrs.data.sql;
         execQuery(sql.text, sql.values).then((result) => {
             log.debug('Got results');
-            jsonexport(result, (err, csv) => {
-                if(err) {
-                    log.error('Error converting to CSV');
-                    log.error(err);
-                    return done(err);
-                }
-                log.debug('Converted to csv');
-                fs.writeFile('out.csv', csv, (err) => {
-                    if(err) {
-                        log.error('Error writing file');
-                        log.error(err);
-                        return done(err);
-                    }
-                    log.info('File created');
-                    done();
-                });
-            });
+            log.debug(typeof result);
+
+            let reader = new Readable();
+            reader._read = function noop(){};
+            reader.push(result);
+            let writer = fs.createWriteStream('out.csv');
+
+            reader.pipe(jsonexport()).pipe(writer);
         }, (err) => {
             log.error('Error getting data from database!');
             log.error(err);
diff --git a/src/libs/routes/region.js b/src/libs/routes/region.js
index 5afeea7788e1804d32f4f9a8ba2d9e79047738b4..1d4344ab95ca3f142d36207ea2fcca976eb3c093 100644
--- a/src/libs/routes/region.js
+++ b/src/libs/routes/region.js
@@ -53,13 +53,13 @@ regionApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
     next();
 }, query, response('region'));
 
-// const agenda = require(`${libs}/agenda`);
-//
-// regionApp.get('/download', (req, res) => {
-//     req.sql.from('regiao').field('*');
-//     let params = req.sql.toParam();
-//     agenda.now('download database', {sql: params});
-//     res.json({msg: 'Wait for it...'});
-// });
+const agenda = require(`${libs}/agenda`);
+
+regionApp.get('/download', (req, res) => {
+    req.sql.from('regiao').field('*');
+    let params = req.sql.toParam();
+    agenda.now('download database', {sql: params});
+    res.json({msg: 'Wait for it...'});
+});
 
 module.exports = regionApp;