write stream in proxy rather that byte array