Added code to poll for OS type