I have only one note - use $? >> 8 instead of $? for testing return code from system call.
In reply to Re: Test module to assist sytem() by ph0enix in thread Test module to assist sytem() by axelrose