In the third chapter of Pirkei Avot we read, Akavia the son of Mahalalel would say: Reflect upon three things and you will not come to the hands of transgression. Know from where you came, where you are going, and before whom you are destined to give a judgement and accounting.
Rabbi Chanina the son of Dosa would say: One whose fear of sin takes precedence to his wisdom, his wisdom endures. But one whose wisdom takes precedence to his fear of sin, his wisdom does not endure.