(#8) - rewrite the logs to the document in debug.html