         db.create (err) ->
             if err
                 logError()
-            else if (process.env.ENV_VARIABLE is 'production')
-                addCouchdbAdmin (err, body) =>
+            else if (process.env.ENV_VARIABLE is 'production')                     
+                addCozyAdmin (err) =>
                     if err
                         logError()
-                    else                        
-                        addCozyAdmin (err) =>
-                            if err
-                                logError()
-                            else
-                                logCreated
+                    else
+                        logCreated
             else
                 logCreated
 

                feed_start()
            else if exists
                if process.env.ENV_VARIABLE is 'production'
                    addCouchdbAdmin (err, body) =>
                        loginCouch = initLoginCouch()
                        if not body.admins? or 
                                body.admins.names[0] isnt loginCouch[0]
                            addCozyAdmin (err) =>

        data = fs.readFileSync '/etc/cozy/couchdb.login'
        lines = S(data.toString('utf8')).lines()
        return lines

    # Add admin to cozy database
    # Result : Unauthorized applications cannot read on cozy
