Added DEBUG constant logic to build