Move the d2w_is_enabled() line on top of the file