(fix) routing to tempfiles in files func