Moved implementation of debug_write method to separate source file.