in bwlimit.set() do not use the global 'dev' but get and pass it to bwlimit.on()