Adds output to diagnostics file.