Saved Session ID is not written correctly into Simulation

Hello, i’m very new to Scala and Gatling and i’m currently running into some problems with my Simulation. I search for my Session identifier in the Response Body with my LoginSim and save it as String in a .txt file. In my LogoutSim i want to read the identifier and use it to logout my sessions. If i implement a println() beneath my function i get the correct ID’s but it wont get used as variable
Someone can help me please?

Login:

Logout:

Please read the documentation: https://gatling.io/docs/current/session/session_api#setting-attributes