named tempfile -> io.BytesIO (still not working though)