add DEBUG_FLAGS option to enable debugging