Improved handling of unexpected syntax errors in logs