     FS.TempStore.Storage = createStore(args.adapter, '_tempstore', args.config)
 
 Meteor.startup ->
-  FileUtils.createCollection('files').then (Files) -> moduleDf.resolve(Files)
+  FileUtils.createCollection(FILE_COLLECTION_ID)
 
 ####################################################################################################
 # AUXILIARY

        insert: Collections.allow
        update: Collections.allow
        remove: Collections.allow

      if Meteor.isServer
        Meteor.publish id, -> if @userId then collection.find() else null
      else
        Meteor.subscribe(id)

      bindMethods(globalName, collection)
      global[globalName] = collection
      df.resolve(collection)
    df.promise


# Necessary to ensure our definition below uses the package-scope reference.
global = @

# A map of collection IDs to promises which are resolved once they are set up.
collectionPromises = {}

# File IDs to deferred promises containing their data.
fileCache = {}

FILE_COLLECTION_ID = 'files'

FileUtils =

  ready: (name) ->
    name ?= FILE_COLLECTION_ID
    Q(collectionPromises[name])

  createCollection: (id, args) ->
    df = Q.defer()
    collectionPromises[id] = df.promise
    adapterPromise = Q.when(@getAdapters())
    adapterPromise.fail (err) ->
      Logger.error('Could not set up CFS adapters', err)
