some refactors
added template id and dataSetId
delete file on download