OK, lets look at other things that may have changed. The xspec application is an obvious one - does it fire off asynchronous tasks that might still be running after the "main" program completes? I know this is a horrible ugly hack, but try putting a
sleep 4 after the
system call before trying to open the file - this is for testing only, you would not want to leave the
sleep there. It may expose a timing issue.
Also consider if you have the same version of xspec running on both machines, they may behave differently.