Use nio in file loader