Fix exceptions

* when encounter an ignore file with empty lines, exception raises
* when `grep` returns error with code other than 1, exception raises