             log.info info = "[OK] config successfully updated"
             callback null, info
 
-  spawnWrapper = (command, args , callback)->
+  spawnWrapper : (command, args , callback)->
     wrapper = spawn command,args
     wrapperErr = ""
     wrapper.stderr.on 'data',(data)->

        callback null, info


   createMountpoint = (options, callback)->
   
     # create mount point for remote resource
     # /Users/<username>/RemoteDrive/<remote_hostname>

      options.mountpoint = path.join config.usersPath, username, config.baseMountDir, remotehost
      
      # fetch user ID for curlftfs command
      @spawnWrapper '/usr/bin/id', ['-u',username], (err,res)=>
        if err?
          log.error error = "[ERROR] Can't find user ID: #{err}"
          callback error
        else
          log.info "[OK] user ID for user #{username} is #{res}"
          ftpfsopts = "#{config.ftpfs.opts},uid=#{res},gid=#{res},fsname=#{remotehost},user=#{remoteuser}:#{remotepass}"
          @createMountpoint options,(err,res)=>
            if err
              callback err
            else
              @spawnWrapper config.ftpfs.curlftpfs,['-o', ftpfsopts, remotehost, options.mountpoint] , (err, res)=>
                if err?
                  log.error error = "[ERROR] couldn't mount remote FTP server #{remotehost}: #{err}"
                  callback error
