Fixing session id.
Fixing work error when folder doesn't exists see #6845