fix some update db bug and improve file service