Add functions that load/save network from/to stream.