use mktemp and use the created environment variable