parsing errors handling improvement