SB 6.1.12

nāśnataḥ pathyam evānnaṁ
 vyādhayo ’bhibhavanti hi
evaṁ niyamakṛd rājan
 śanaiḥ kṣemāya kalpate
Synonyms: 
na — not; aśnataḥ — those who eat; pathyam — suitable; eva — indeed; annam — food; vyādhayaḥ — different types of disease; abhibhavanti — overcome; hi — indeed; evam — similarly; niyama-kṛt — one following regulative principles; rājan — O King; śanaiḥ — gradually; kṣemāya — for well-being; kalpate — becomes fit.
Translation: 
My dear King, if a diseased person eats the pure, uncontaminated food prescribed by a physician, he is gradually cured, and the infection of disease can no longer touch him. Similarly, if one follows the regulative principles of knowledge, he gradually progresses toward liberation from material contamination.
Purport: 

One is gradually purified if one cultivates knowledge, even through mental speculation, and strictly follows the regulative principles enjoined in the śāstras and explained in the next verse. Therefore the platform of jñāna, speculative knowledge, is better than the platform of karma, fruitive action. There is every chance of falling from the platform of karma to hellish conditions, but on the platform of jñāna one is saved from hellish life, although one is still not completely free from infection. The difficulty is that on the platform of jñāna one thinks that he has been liberated and has become Nārāyaṇa, or Bhagavān. This is another phase of ignorance.

ye ’nye ’ravindākṣa vimukta-māninas
 tvayy asta-bhāvād aviśuddha-buddhayaḥ
āruhya kṛcchreṇa paraṁ padaṁ tataḥ
 patanty adho ’nādṛta-yuṣmad-aṅghrayaḥ

(Bhāg. 10.2.32)

Because of ignorance, one speculatively thinks himself liberated from material contamination although actually he is not. Therefore even if one rises to brahma jñāna, understanding of Brahman, one nevertheless falls down because of not taking shelter of the lotus feet of Kṛṣṇa. Nonetheless, jñānīs at least know what is sinful and what is pious, and they very cautiously act according to the injunctions of the śāstras.