test "regex error", add condition for "out put file"