Setup tempdoc for hidewhens (improved even more)