limited the error processing loop to once, added language detection