Set debug value to false by default
Do reject the promise when calling debug with the debug flag off
Remove useless ifs
Correct header for locale saving