Changed Error Checks for OSX