Implement --debug flag to print debug log to stderr.
Implement --debug flag to print debug log to stderr.