use local z_message to remove a memory leak