Refactored mod debugging