dump errors & debugging output to stderr

I tried to go through the places where I thought it made sense to dump output to stderr. This is just an initial take at it - more of a proposal.