print "Sub failed with error: $rv" if (!$rv);