Added a (finish-output) to some debug output.