Make debug a flag, fix embarrassing noob CPP issue