Gen html to file with template