Moved dataset load out of loop.