Fixed "create session per file" bug