Improve error handling for update-locale