Correctly dump images to stderr

And also print out other useful information.