added check for temporary directory