Is "Expected an error but CreateSession returned none." the correct statement to log? Shouldn't it error out saying that an error was expected but none were received?

Also, why do we close the session at this point - is that necessary?