Improved debug