db: stype function replacement
db: update history table

on create, delete file and updateCounter