Add DEBUG flag.
Use new DEBUG flag to control output in NetworkIO.