The references should be imported immediately because the files can be very big and this would exceed the memory limit fast