All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
The Sharee‘ah has urged the financial support of an orphan and assigned a great reward for doing this. It is enough as evidence of this to cite the statement of the Prophet, sallallaahu ‘alayhi wa sallam, as he said: "I and the one who looks after an orphan will be like this in Paradise", showing his middle and index fingers and separating them." [Al-Bukhari]
Since you have provided for this orphan as long as you were able to, then we hope that you would obtain this reward Allaah Willing. However, if you failed to maintain your support of that orphan, then there is no blame on you as you are not obliged to do so in the first place but you did so voluntarily. The Prophet, sallallaahu ‘alayhi wa sallam, clarified for us the best degrees of man's spending in terms of those who are most deserving of it. It is narrated on the authority of Jaabir that he said: "A person from Banu ‘Uthrah set a slave free after his death and this news reached the Messenger of Allaah, sallallaahu ‘alayhi wa sallam. Upon this he said (to the man): "Have you any wealth besides it?” He said: “No.” Upon this he said: "Who would buy (this slave) from me?” Nu‘aym ibn ‘Abdullaah bought him for eight hundred dirhams and (this amount was) brought to the Messenger of Allaah sallallaahu ‘alayhi wa sallam, who returned the slave to him (i.e. the owner) and then said: "Start with your own self in terms of spending and, if anything is left, it should be spent on your family and, if anything is left (after meeting the needs of the family) it should be spent on relatives and, if anything is left after the relatives, it should be spent like this and like that, meaning in front of you, on your right and on your left." [An-Nasaa’i] [Al-Albaani: Saheeh]
In summary, you have done good in both cases and there is not upon the doers of good any cause for blame. And Allaah The Almighty is Forgiving and Merciful.