Preserve Debug flag accross config writes
Merge pull request #2145 from eMerzh/preserve_debug

Preserve Debug flag accross config writes