Added DEBUG setting handling.