Improved sync to drive function