         endDate, startDate } = campaign
 
       if Date.now() < startDate.getTime()
-        console.info "campaign is not started yet"
+        console.info "campaign #{campaignName} is not started yet"
         return callback null, isValid: no
 
       # if date is valid
       if Date.now() > endDate.getTime()
-        console.info "date is not valid for campaign"
+        console.info "date is not valid for campaign #{campaignName}"
         return callback null, isValid: no
 
       # if campaign initial amount is 0


      return callback null, { isValid: yes, campaign }

  @isCampaignValid = isCampaignValid

  @fetchCampaignDiskSize = (callback)->
    @isCampaignValid (err, { isValid, campaign })->
      return callback err if err
      return callback null, campaign?.campaignPerEventAmount or 256

  @fetchCampaign = fetchCampaign = (campaignName, callback)->
    [campaignName, callback] = [REGISTER_CAMPAIGN, campaignName] unless callback
    JReferralCampaign.one {name: campaignName}, (err, campaign) ->
      return callback err if err
      return callback null, no  unless campaign
      return callback null, campaign

   increaseGivenAmountSpace:(size, callback)->
    [size, callback] = [@campaignPerEventAmount, size] unless callback
    size = size * 4
    @update $inc : campaignGivenAmount: size , callback


      @remove callback


  DEFAULT_CAMPAIGN = "register"


  @fetchCampaign = fetchCampaign = (campaignName, callback)->

    unless callback
      [campaignName, callback] = [DEFAULT_CAMPAIGN, campaignName]

    JReferralCampaign.one name: campaignName, (err, campaign) ->
      return callback err  if err
      callback null, campaign


  @isCampaignValid = isCampaignValid = (campaignName, callback)->

    unless callback
      [campaignName, callback] = [DEFAULT_CAMPAIGN, campaignName]

    fetchCampaign campaignName, (err, campaign)->

      return callback err  if err
      return callback null, isValid: no  unless campaign

