James 4:6 ……God resists the proud, but gives grace to the humble.
Compare with Luck 18-9-14

Two men went up to pray in the mosque. One was a good Muslim who knew all the right actions for his ritual commitment- his Arabic was perfect and he was accomplished in the words and movements of the Salat (Liturgical form of prayer). He went confidently to the center of the mosque, knelt and prayed correctly and precisely –but, meanwhile, his thoughts were else where on the pretty girl who lived next door.

The second man was a down –and out sinner who had led a corrupt life and hadn’t prayed for a very long time.

He couldn’t remember how to perform the Salat and felt shy as he entered the mosque . He quickly slipped behind a large pillar where he whispered his own prayer. “Oh God forgive me , I have made a complete mess of my life, but I long now to follow and serve you”

Now, whose devotion is more acceptable to God? God looks to the heart and the intentions rather than outward ritual. (See also Injeel Matthew 23:23-36)