Before rubbing, both the glass rod and the silk cloth are electrically neutral. In other words, the net charge on the glass rod and the silk cloth is zero. When the glass rod is rubbed with silk cloth, a few electrons from the glass rod get transferred to the silk cloth. As a result, the glass rod becomes positively charged and the silk cloth negatively charged. Since the magnitude of positive charge on the glass rod is the same as that of negative charge on the silk, the net charge on the system is zero. Thus the appearances of charge on the glass rod and the silk cloth is in accordance with the law of conservation of charges.