Added creation of sessionId and temporary directory