in reply to vanishing system call

I've tried -w, $!, and all that
You should be looking at $? instead.

And try capturing the output of STDERR, for example into a text file, using the "2>logfile.txt" syntax. I'm sure some useful info will be found in there.