setting 'errno' to nil to prevent warnings fetching it