Move checkPlatform code here for now