Revert "Revert "Adding debug flags""

This reverts commit 4232366a76508b63fd0cc43cc4a6e7bdac6272f0.