Put session inside try-catch