I'm writing the solution just in case someone else encounters the same problem.
The grammar path needs to be in URL form ( "file:/C:/...." )