Tidy debug level variables and fix waveform updating from file manager.