avoid infinite loop in threads with rank > 0 if read fails