2 Esdras 7:69-79

69 I think it would be better if after death we did not have to face judgment."
70 The angel replied, "When God Most High was creating the world, as well as Adam and his descendants, the first thing he did was to get everything ready for the judgment.
71 So you ought to learn from your own words. You said that your reason grows up with you,
72 and that's the point. The people of this world used their reason and sinned; they received God's commands but did not keep them; they accepted the Law and then disobeyed it. And that's why they will suffer torment.
73 What excuse can they offer at the judgment? How can they answer at the last day?
74 God Most High has been very patient with the people of this world for a long time, but it has not been for their sake. He has done it for the sake of the age to come."
75 Then I said, "Sir, may I ask you, please, to explain to me what happens when we die, when each of us must give back our soul? Will we be kept at rest until the time when you begin to make your new creation, or will our torment begin immediately?"
76 "I will answer that question also," he replied, "but do not include yourself among those who will be tormented because they have no use for religion.
77 After all, you have a treasure of good works stored up with God Most High, which will not be shown to you until the last days.
78 But to answer your question about death: When God Most High has pronounced the final decree that a person shall die, the soul leaves the body to return to the one who gave it. Immediately it praises the glory of God Most High.
79 Let me explain first about people who had no use for the ways of God Most High and hated those who worshiped him.
Scripture taken from the Good News Translation - Second Edition, Copyright 1992 by American Bible Society. Used by Permission.