Refactor some error message.