Synchronously save every 10 queries