Add prettyPrint function useful for debugging.