Just a minor thing - it looks like this will be unhelpful if `filename` is not passed (I don't recall the details, but I believe there are occasions where this happens). Maybe this should be `if (verbose && filename)`?