Updated sync script