moved creating directory to Session