Implement task queue for more robust sync