the temp path check was unsafe. now corrected.