Galatians 3:10 For as many as are of the works of the law are under the curse: for it is written, Cursed is every one that continueth not in all things which are written in the book of the law to do them.
The law speaks of continued obedience and obedience in all things. There is no provision for "trying to keep the commands of the Law". Either you keep it all continually, or you are under its "curse".
James 2:10 For whosoever shall keep the whole law, and yet offend in one point, he is guilty of all.
Since the Law is not just the 10 commandments, but an indivisible unit (moral, civil and ceremonial) of 613 commandments, failing to keep it all makes you "guilty of breaking it all".
The more you try to keep the commands of the Law, the more it will keep you in its bondage and curse. The Law can only condemn you, it can never justify you or make you righteous.