fix a bug, should set fail if $expect_not_found is 1 but found the term in the serial file