handling TEMPFOLDER done outside

now a passed param