Error log stored in variable rather than dumping immediately to the screen