corrected BytesIO import