update last file & fatabase