Removed debug output in do_kmath, converted * to output_io