Track used networks and devices in state file