Pass file object to require function, instead of file.fullPath