Fix bug when rules.txt is missing