The following quotes are from Gustavo Gutierrez' On Job: God-Talk and the Suffering of the Innocent:
"The language we use depends on the situation we are in. Job's words are a criticism of every theology that lacks human compassion and contact with reality; the one-directional movement from theological principles to life really goes nowhere. A quest for understanding that that is based on human and religious experience gives a glimpse of other ways of speaking (and keeping silent) about God.
Job... is, as it were, caught in the middle between, on the one side, a theory from which he cannot manage to free himself (the ethico-religious doctrine of retribution) and, on the other, the personal experience that convinces him of his innocence. Despite this dilemma, Job does not let himself be carried away by an abstract and facile logic: he will never say that God is unjust. Instead of speaking ill of the God in whom he believes, he challenges the foundations of the prevailing theology.
His friends try to corner him by claiming that his declaration of innocence amounts to a condemnation of God. Job... answers that God is not to be justified by condemning the innocent. But the dilemma torments him, and he tries to escape its grip. He does not know how to do it, but he is convinced that the theological method of his friends leads nowhere but to contempt for human beings and thus to a distorted understanding of God.
Job is sure that God knows him to be innocent. His friends do not know it, but God does... We, the readers of the Book of Job, also know that he is innocent and that this is how God sees him, for the author of the book has told us so in the prologue. For Job himself, however, the conviction that God knows his true situation is a conviction born of faith."