checking subprocess status