Correctly read debug flag
Fix config loading