Add error handling to log line processing.