I suggest that you create a log file for the debug.
Add prints to the file - this will point you to solve your issue.
Hope it helps,
Devshed is a Developer Shed Property, Owned by Jim Boykin, CEO of Internet Marketing Ninjas
Dev Shed Forums
© 2003 - 2016 by Devshed, LLC. All rights reserved