it was using prettyprint when it should have been using write.

it was using prettyprint when it should have been using write.