Could you show us the stack trace (error)? Also, what is the general purpose of this program? It seems a bit odd to just say "this doesn't work, fix it" without giving any other information.