Don't use inefficient strlen to get number of bytes read