Added logs. Fixed crash when creating a session