introduce and fixed error in fxnSetTempDir