 
 
 saveTweetGroup = (client, path, start, callback) ->
+    log.info client.options
+
     client.get path, (err, res, tweets) ->
-        tweets = tweets.reverse()
-        log.info "#{tweets.length} tweets to import"
-        tweets.pop() if path.indexOf('max_id') isnt -1
-
         if err
             callback err
+        else if res.statusCode
+            callback new Error 'Bad authentication data'
         else
+            console.log tweets
+            console.log res.statusCode
+
+            log.info "#{tweets.length} tweets to import"
+            tweets = tweets.reverse()
+            tweets.pop() if path.indexOf('max_id') isnt -1
+
             lastId = null
             recSave = ->
                 if tweets?.length > 0

                            if err
                                callback err
                            else
                                recSave()
                    else
                        callback null, null


    fields:
        consumerKey: "text"
        consumerSecret: "password"
        accessToken: "text"
        accessTokenSecret: "password"
    models:
