This should probably be part of util-print or util-debug, or be replaced by the code there