Sri Ramakrishna used to warn spiritual seekers that one has to be extremely focused to realize God. He would say that seekers can easily get distracted by phenomenon such as occult powers.
Once there was a Sadhu who was a sincere seeker and a serious Sadhaka. Somehow he acquired some occult powers due to power of his Sadhana and soon he became vain and egoistic about them. One day the Lord disguised as a holy man came to him and praised his occult powers. Just then an elephant passed by. The holy man asked the Sadhu whether he could kill the elephant if he so desired. The Sadhu said, “Yes” and so saying took some dust and uttered some Mantras and threw it over the elephant. The animal struggled for a while in pain and then dropped down dead. The Lord admired the powers of the Sadhu saying that he could kill the elephant apparently without any effort. The Sadhu felt elated and laughed. Again the Lord in the guise of the holy man asked him whether he could revive the elephant. Accepting the challenge, the Sadhu once again threw a handful of dust over the animal uttering some Mantras. In no time the elephant came back to life. Then the Lord while admiring his occult powers told him that he (Sadhu) could kill and revive the elephant, but what had he achieved in the process for himself. Had he felt spiritually uplifted? Was he able to realize God through these occult powers? So saying, the Lord vanished. The Sadhu realized his folly and once again turned his attention to serious Sadhana.
Sri Ramakrishna used to say that subtle are the ways of Dharma. Often the least of distractions can take an aspirant away from the goal of God realization.