Make debug mode  global and do some debuggin
Merge branch 'master' of https://github.com/stayradiated/Nitro-Sync