tiff: return meaningful error codes.