remove all printf's and replace them with rpc_set_error()