Refactoring Debug Output