use $TMPDIR instead of arbitrary directory