initialize templete
delete invalid file