Improved debug handling—any debug parameter now triggers debug mode