fix problems with temp dic directory