Improved debugging