update delete file, update detail and template footer