Fix bug: correctly determine if parsing errors were or not

Rename `debug` argument