Move netroute require into function where it's used