added debug logging for parse error