Move #enable_debug check on top (before place where it is used)