added correct error handling in parser and gui