Increment error counter in case of error