wrap download filename in funcion