Added mock sniffer task and fixed logic bug