creates a reference, with handler, for each file resource