Use $? to determine exit status