Added switch for detect os