ingnore invalid templates
added command to dump invalid pages
fixed command issues
fixed test cases
Merge branch 'hotfix/invalid-tempalte'