Updated Sync script