added temp directory wrapper