Insert data in chunks to avoid mongo's 16 MB limit