correct the implementation of rule searching; add debug option
modify gitignore