/// <summary>
        /// Synchronize one bundle
        /// </summary>
        /// <param name="bundle">The bundle to be synchronized</param>
        /// <returns></returns>
        public string syncBundle(Bundle bundle){
            String bundle_lastest_version_id = core.GetLatestVersionIdFromServer(bundle.weeId);
            if (bundle_lastest_version_id == null){
                //bundle foi eliminado do servidor
                //delete bundle from db 
                //delete bundle from FS
                try{
                    fileSystem.DeleteRecursiveFolder(bundle.getPath(path_bundles));
                    dataBase.DeleteBundle(bundle.localId);
                    foreach (String t in bundle.weeTags){
                        Tag tag;
                        if ((tag = Scheme.getTagByWeeIds(t, scheme)) != null){
                            fileSystem.DeleteFile(tag.Path + "\\" + bundle.localId + ".lnk"); //tags exists 
                        }
                        //else .... -> if the tags have been removed we don't care.
                    }
                return null;

                }catch(Exception e){
                    ; 
                }

                }
                if (bundle_lastest_version_id == bundle.weeId){
                    //Bundle doesn't have a new version on server
                    _sync_with_no_new_version(bundle);
                    Bundle bundle2 = core.GetLatestVersionFromServer (bundle_lastest_version_id);
                    if (bundle2 != null)
                        bundle2.localId = bundle.localId;
                        generateBundleWebPage(bundle2);
                return bundle_lastest_version_id;
            }
            else{
                //bundle has a new version on server
                _sync_with_new_version(bundle);
                Bundle b = core.getBundleInfo(bundle_lastest_version_id); 
                generateBundleWebPage(b);
                    bundle2.localId = bundle.localId;
                    generateBundleWebPage (bundle2);
                }
                return bundle_lastest_version_id;
            }