أحسن الله إليكم In my masjid the imam prays taraweeh and then prays tahajjud with the jamaah an hour before fajr. If we wait for the imam to leave after taraweeh would we get the reward of standing the whole night as in the Hadith or should we return for tahajjud and then wait for him to leave?

Ustadh AbdulAziz al-Haqqan
If you pray taraweeh, it is sufficient in sha'a Allah for the hadeeth, but that does not mean that if you want to pray more then you shouldn't. Not at all, pray as much as you like may Allah reward you.