add error output for ast