Update guard.lua: add useragentFilter function