Use a proper logging module, log debug and statistics to separate files, errors to stdout.
Use a proper logging module, log debug and statistics to separate files, errors to stdout.