Check for OSError as well