Is this necessary? If so, I'd suggest using the ?debugFmt macro in eunit.