Checking puppet apply exit code