Using log to redirect diagnostic messages to stderr