FIX the bug for tmpDir