error handling for child exec()