I'd put this if outside the other.

but :+1: anyway... no need for locks, since the temp dir won't change (or shouldn't, anyway)