Handle parse errors gracefully