I suggest to use stderr as debugging output. It's because some useful softwares are utilziing stdio as pipelined I/O.