Implemented a debug output system.