added error return to  getOSType and updated affected calling code