Add debugging functions to utils.