Refactored checkVersion()