syntax error repair, more logging