Running Matlab M files via Xgrid

I am not able to get out put results when I submit a Matlab job via Xgrid in Leopard
The Basic command line I use is
xgrid -job submit /Applications/MATLAB_R2008b.app/bin/matlab -nodesktop -nodisplay -r xxx.m
I also Tried
xgrid -job submit /Applications/MATLAB_R2008b.app/bin/matlab -nojvm -nodisplay -r xxx.m

I get a completed indication in Xgrid admin tools. I get no results when I call the job ID output
My M file also creates a txt file but no txt file is created in the agent computer.
The files are installed in both computers and Matlab too.

I have searched all over the internet for suggestions but could not find much. Any suggestions