Abu Hurairah (may Allah be pleased with him) reported that the Messenger of Allah (peace and blessings of Allah be upon him) said , "The reward for Salat performed by a person in congregation is more than 20 times greater than that of the Salat performed in ones house or shop. When one performs wudu perfectly and then proceeds to the mosque with the sole intention of performing Salat , then for every step he takes towards the mosque, he is upgraded one degree in reward and one of his sins is eliminated until he enters the mosque, and when he enters the mosque, he is considered as performing Salat as long as it is the Salat which prevents him ( from leaving the mosque ); and the angles keep on supplicating Allah for him as long as he remain in his place of prayer . They say: O Allah accept his repentance.' This will carry on as long as does not pass wind."
[Al-bukhari and Muslim]