How many files are being wrapped here? I think the `wrap` method can be simplified a bit.