more strict error check, and tweak ignoring rule in git