Adds error localization