catching parse errors and reporting error condition to stdout
and returns 1 on error