check system return value