Break sequential search loop as soon as error is occurred