Added logging out of error message stack