Adding parse error handling