rebuild error document if it does not exist