Yup, i agree with Json. Its kinda hard to debug it over the script file. Hm, try first it on eclise.

Cheers,
Truffy