Add version check and update version to 2.2.7