fix log numbering
fix abort due to inverted condition