added a version check to generate session log