This sort of problem can be difficult to figure out (as you've already experienced) because it can be caused by a number of different things. I recommend placing a few STRTOFILE() commands in the app at critical points to determine where and when the actual problem is occurring.
Regards,
Kevin McNeish Eight-Time .NET MVP VFP and iOS Author, Speaker & Trainer Oak Leaf Enterprises, Inc. Chief Architect, MM Framework http://www.oakleafsd.com