only spew to stderr if in debug mode

/cc @sshirokov, @jbarnette