There once lived a worshipper who could never get himself to perform any of his deeds sincerely, and free from showing off.
Once, attempting to redress his problem, he said to himself: ‘In the corner of the city there lies an abandoned mosque which is never frequented by anyone. It would be better if I go there in the night so that there is none to see me, and engage myself in worshipping Allah, in total sincerity.’
At midnight, in the darkness of the night, he stealthily set out for the mosque. The night was a rainy one with severe lightening and thunder.
Once inside, he engaged himself in worship. A short while later he suddenly happened to hear a sound and ecstatically said to himself: ‘Surely, a person has entered the mosque.’ With this in mind he increased the quality and quantity of his prayers and continued his acts of worship till daybreak. In the morning, as he was about to go out of the mosque, he looked behind with the corner of his eyes only to realize that there was no one there save a black dog that had sought shelter in the mosque from the rains, lightning and thunder.
This distressed him immensely, and repentant and shameful for having worshipped for hours for a dog, he rebuked himself: ‘Woe unto me! I fled and came to this abandoned mosque so that I could worship Allah with sincerity, but I have ended up performing my acts of worship for a black dog, instead.( Dastan-ha Wa Pand-ha, vol. 9, pg. 173; Muntakhab Qawamis al-Durar, pg. 144 )