added rio_readinit() calls to the client case in main.c