 KONFIG            = require('koding-config-manager').load("main.#{argv.c}")
 
 
-isValid = ({ ipAddress, queryString, storage }) ->
+validate = ({ ipAddress, queryString, storage }) ->
 
   if ipAddress? and (ipAddress.split '.').length isnt 4
-    return new KodingError 'Provided IP is not valid', 'WrongParameter'
+    return { err : new KodingError 'Provided IP is not valid', 'WrongParameter' }
 
   if queryString? and (queryString.split '/').length isnt 8
-    return new KodingError 'Provided queryString is not valid', 'WrongParameter'
+    return { err : new KodingError 'Provided queryString is not valid', 'WrongParameter' }
 
   if storage? and isNaN +storage
-    return new KodingError 'Provided storage is not valid', 'WrongParameter'
+    return { err : new KodingError 'Provided storage is not valid', 'WrongParameter' }
 
-  return null
+  return { err : null }
 
 getKiteIdOnly = (queryString) ->
   "///////#{queryString.split('/').reverse()[0]}"

      return callback new KodingError \
        'A valid machineId and an update option is required.', 'WrongParameter'

    if err = isValid { ipAddress, queryString, storage }
      return callback err

    fieldsToUpdate = {}


    { label, queryString, ipAddress } = options
    { r: { group, user, account } } = client

    { err } = validate { queryString, ipAddress }
    return callback err  if err

    queryString = getKiteIdOnly queryString
    provider    = @providerSlug
