Remove unneeded/broken code
Show output if debug logging is disabled